Reference·Java · nl.bimbase.bimworks.client.apisJava

TokensApi

CLASS in nl.bimbase.bimworks.client.apis.

API catalogue · nl.bimbase.bimworks.client.apis · CLASS

Java#
public class 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)

Inheritance and interfaces#

Members#

Member Kind Description
TokensApi(BimWorksClient) CONSTRUCTOR
createVersionsToken(Set<UUID>, Duration, EnumSet<Scope>, Set<String>, boolean) METHOD 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 tas…
createVersionsToken(Set<UUID>, Duration, Set<String>, Set<String>, boolean) METHOD Create a new "VersionsToken".
createNodesToken(Set<UUID>, Duration, EnumSet<Scope>, Set<String>, boolean) METHOD Create a new "NodesToken" restricted to the given scopes (the preferred variant). The issued scopes can never exceed the scopes of the issuing credential.
createNodesToken(Set<UUID>, Duration, Set<String>, Set<String>, boolean) METHOD
createRecursiveNodeToken(UUID, Duration, EnumSet<Scope>, Set<String>, boolean) METHOD Create a new "RecursiveNodeToken" restricted to the given scopes (the preferred variant). The issued scopes can never exceed the scopes of the issuing creden…
createRecursiveNodeToken(UUID, Duration, Set<String>, Set<String>, boolean) METHOD

TokensApi(BimWorksClient)#

Parameters#

Name Type Description
bimWorksClient BimWorksClient

createVersionsToken(Set<UUID>, Duration, EnumSet<Scope>, Set<String>, boolean)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode createVersionsToken(java.util.Set<java.util.UUID> versionUuids, java.time.Duration duration, java.util.EnumSet<nl.bimbase.bimworks.client.Scope> scopes, java.util.Set<java.lang.String> allowedIpAdresses, boolean linkAccount) throws nl.bimbase.bimworks.client.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#

Name Type Description
versionUuids java.util.Set<java.util.UUID> A Set of UUID representing the Versions you want to give access to
duration java.time.Duration How long this token should be valid
scopes java.util.EnumSet<nl.bimbase.bimworks.client.Scope> The scopes granted to the token; null keeps the issuing credential's own scopes (or an unscoped token for an unscoped account)
allowedIpAdresses java.util.Set<java.lang.String> IP addresses that are allowed to use the token. When empty there is no restriction on IP addresses
linkAccount boolean

createVersionsToken(Set<UUID>, Duration, Set<String>, Set<String>, boolean)#

Java#
@java.lang.Deprecated
public com.fasterxml.jackson.databind.node.ObjectNode createVersionsToken(java.util.Set<java.util.UUID> versionUuids, java.time.Duration duration, java.util.Set<java.lang.String> allowedTasks, java.util.Set<java.lang.String> allowedIpAdresses, boolean linkAccount) throws nl.bimbase.bimworks.client.BimWorksException
Warning

Deprecated: task-name allow-lists are deprecated — use the Scope based variant

Create a new "VersionsToken".

Parameters#

Name Type Description
versionUuids java.util.Set<java.util.UUID> A Set of UUID representing the Versions you want to give access to
duration java.time.Duration How long this token should be valid
allowedTasks java.util.Set<java.lang.String> 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 java.util.Set<java.lang.String> IP addresses that are allowed to use the token. When empty there is no restriction on IP addresses
linkAccount boolean

Exceptions#

  • BimWorksException —

createNodesToken(Set<UUID>, Duration, EnumSet<Scope>, Set<String>, boolean)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode createNodesToken(java.util.Set<java.util.UUID> nodeUuids, java.time.Duration duration, java.util.EnumSet<nl.bimbase.bimworks.client.Scope> scopes, java.util.Set<java.lang.String> allowedIpAdresses, boolean linkAccount) throws nl.bimbase.bimworks.client.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.

Parameters#

Name Type Description
nodeUuids java.util.Set<java.util.UUID>
duration java.time.Duration
scopes java.util.EnumSet<nl.bimbase.bimworks.client.Scope>
allowedIpAdresses java.util.Set<java.lang.String>
linkAccount boolean

createNodesToken(Set<UUID>, Duration, Set<String>, Set<String>, boolean)#

Java#
@java.lang.Deprecated
public com.fasterxml.jackson.databind.node.ObjectNode createNodesToken(java.util.Set<java.util.UUID> nodeUuids, java.time.Duration duration, java.util.Set<java.lang.String> allowedTasks, java.util.Set<java.lang.String> allowedIpAdresses, boolean linkAccount) throws nl.bimbase.bimworks.client.BimWorksException
Warning

Deprecated: task-name allow-lists are deprecated — use the Scope based variant

Parameters#

Name Type Description
nodeUuids java.util.Set<java.util.UUID>
duration java.time.Duration
allowedTasks java.util.Set<java.lang.String>
allowedIpAdresses java.util.Set<java.lang.String>
linkAccount boolean

createRecursiveNodeToken(UUID, Duration, EnumSet<Scope>, Set<String>, boolean)#

Java#
public com.fasterxml.jackson.databind.node.ObjectNode createRecursiveNodeToken(java.util.UUID nodeUuid, java.time.Duration duration, java.util.EnumSet<nl.bimbase.bimworks.client.Scope> scopes, java.util.Set<java.lang.String> allowedIpAdresses, boolean linkAccount) throws nl.bimbase.bimworks.client.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.

Parameters#

Name Type Description
nodeUuid java.util.UUID
duration java.time.Duration
scopes java.util.EnumSet<nl.bimbase.bimworks.client.Scope>
allowedIpAdresses java.util.Set<java.lang.String>
linkAccount boolean

createRecursiveNodeToken(UUID, Duration, Set<String>, Set<String>, boolean)#

Java#
@java.lang.Deprecated
public com.fasterxml.jackson.databind.node.ObjectNode createRecursiveNodeToken(java.util.UUID nodeUuid, java.time.Duration duration, java.util.Set<java.lang.String> allowedTasks, java.util.Set<java.lang.String> allowedIpAdresses, boolean linkAccount) throws nl.bimbase.bimworks.client.BimWorksException
Warning

Deprecated: task-name allow-lists are deprecated — use the Scope based variant

Parameters#

Name Type Description
nodeUuid java.util.UUID
duration java.time.Duration
allowedTasks java.util.Set<java.lang.String>
allowedIpAdresses java.util.Set<java.lang.String>
linkAccount boolean

Inherited members#

  • java.lang.Object#equals(java.lang.Object)
  • java.lang.Object#toString()
  • java.lang.Object#wait(long)
  • java.lang.Object#wait(long,int)
  • java.lang.Object#wait()
  • java.lang.Object#finalize()
  • java.lang.Object#getClass()
  • java.lang.Object#hashCode()
  • java.lang.Object#clone()
  • java.lang.Object#notify()
  • java.lang.Object#notifyAll()
  • getBimWorksClient()