Class TokensApi

java.lang.Object
nl.bimbase.bimworks.client.apis.SubApi
nl.bimbase.bimworks.client.apis.TokensApi

public class TokensApi extends SubApi
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 Details

  • 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 to
      duration - How long this token should be valid
      scopes - 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 the Scope based variant
      Create a new "VersionsToken".
      Parameters:
      versionUuids - A Set of UUID representing the Versions you want to give access to
      duration - How long this token should be valid
      allowedTasks - 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 the Scope based 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 the Scope based variant
      Throws:
      BimWorksException