Class TokensApi
java.lang.Object
nl.bimbase.bimworks.client.apis.SubApi
nl.bimbase.bimworks.client.apis.TokensApi
This API provides token related calls. Most calls allow you to create Auth Tokens, which can then be used to for delegation of authentication and authorization.
Auth Token are generally used from differents (parts of) applications. The Java SDK allows you to create new
BimWorksClient with Auth Tokens using BimWorksClientFactory.createClientWithAuth(ObjectNode)-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.node.ObjectNodecreateNodesToken(Set<UUID> nodeUuids, Duration duration, EnumSet<Scope> scopes, Set<String> allowedIpAdresses, boolean linkAccount) Create a new "NodesToken" restricted to the given scopes (the preferred variant).com.fasterxml.jackson.databind.node.ObjectNodecreateNodesToken(Set<UUID> nodeUuids, Duration duration, Set<String> allowedTasks, Set<String> allowedIpAdresses, boolean linkAccount) Deprecated.com.fasterxml.jackson.databind.node.ObjectNodecreateRecursiveNodeToken(UUID nodeUuid, Duration duration, EnumSet<Scope> scopes, Set<String> allowedIpAdresses, boolean linkAccount) Create a new "RecursiveNodeToken" restricted to the given scopes (the preferred variant).com.fasterxml.jackson.databind.node.ObjectNodecreateRecursiveNodeToken(UUID nodeUuid, Duration duration, Set<String> allowedTasks, Set<String> allowedIpAdresses, boolean linkAccount) Deprecated.task-name allow-lists are deprecated — use theScopebased variantcom.fasterxml.jackson.databind.node.ObjectNodecreateVersionsToken(Set<UUID> versionUuids, Duration duration, EnumSet<Scope> scopes, Set<String> allowedIpAdresses, boolean linkAccount) Create a new "VersionsToken" restricted to the given scopes (the preferred variant — scopes keep working when new API calls are added to a family, unlike task-name lists).com.fasterxml.jackson.databind.node.ObjectNodecreateVersionsToken(Set<UUID> versionUuids, Duration duration, Set<String> allowedTasks, Set<String> allowedIpAdresses, boolean linkAccount) Deprecated.task-name allow-lists are deprecated — use theScopebased variantMethods inherited from class SubApi
getBimWorksClient
-
Constructor Details
-
TokensApi
-
-
Method Details
-
createVersionsToken
public com.fasterxml.jackson.databind.node.ObjectNode createVersionsToken(Set<UUID> versionUuids, Duration duration, EnumSet<Scope> scopes, Set<String> allowedIpAdresses, boolean linkAccount) throws BimWorksException Create a new "VersionsToken" restricted to the given scopes (the preferred variant — scopes keep working when new API calls are added to a family, unlike task-name lists). The issued scopes can never exceed the scopes of the credential this client is authenticated with.- Parameters:
versionUuids- A Set of UUID representing the Versions you want to give access toduration- How long this token should be validscopes- The scopes granted to the token; null keeps the issuing credential's own scopes (or an unscoped token for an unscoped account)allowedIpAdresses- IP addresses that are allowed to use the token. When empty there is no restriction on IP addresses- Throws:
BimWorksException
-
createVersionsToken
@Deprecated public com.fasterxml.jackson.databind.node.ObjectNode createVersionsToken(Set<UUID> versionUuids, Duration duration, Set<String> allowedTasks, Set<String> allowedIpAdresses, boolean linkAccount) throws BimWorksException Deprecated.task-name allow-lists are deprecated — use theScopebased variantCreate a new "VersionsToken".- Parameters:
versionUuids- A Set of UUID representing the Versions you want to give access toduration- How long this token should be validallowedTasks- The allowed set of API calls. When empty there is no restriction on the allowed API calls. It is important to note that including API calls in this list merely allows them to be called, the calls themselves will still check the relevant authorization.allowedIpAdresses- IP addresses that are allowed to use the token. When empty there is no restriction on IP addresses- Returns:
- Throws:
BimWorksException
-
createNodesToken
public com.fasterxml.jackson.databind.node.ObjectNode createNodesToken(Set<UUID> nodeUuids, Duration duration, EnumSet<Scope> scopes, Set<String> allowedIpAdresses, boolean linkAccount) throws BimWorksException Create a new "NodesToken" restricted to the given scopes (the preferred variant). The issued scopes can never exceed the scopes of the issuing credential.- Throws:
BimWorksException
-
createNodesToken
@Deprecated public com.fasterxml.jackson.databind.node.ObjectNode createNodesToken(Set<UUID> nodeUuids, Duration duration, Set<String> allowedTasks, Set<String> allowedIpAdresses, boolean linkAccount) throws BimWorksException Deprecated.task-name allow-lists are deprecated — use theScopebased variant- Throws:
BimWorksException
-
createRecursiveNodeToken
public com.fasterxml.jackson.databind.node.ObjectNode createRecursiveNodeToken(UUID nodeUuid, Duration duration, EnumSet<Scope> scopes, Set<String> allowedIpAdresses, boolean linkAccount) throws BimWorksException Create a new "RecursiveNodeToken" restricted to the given scopes (the preferred variant). The issued scopes can never exceed the scopes of the issuing credential.- Throws:
BimWorksException
-
createRecursiveNodeToken
@Deprecated public com.fasterxml.jackson.databind.node.ObjectNode createRecursiveNodeToken(UUID nodeUuid, Duration duration, Set<String> allowedTasks, Set<String> allowedIpAdresses, boolean linkAccount) throws BimWorksException Deprecated.task-name allow-lists are deprecated — use theScopebased variant- Throws:
BimWorksException
-
Scopebased variant