Class OAuthClient

java.lang.Object
com.atlan.model.core.AtlanObject
com.atlan.model.admin.OAuthClient
All Implemented Interfaces:
Serializable

public class OAuthClient extends AtlanObject
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • create

      public static OAuthClient create(AtlanClient client, String displayName, String role) throws AtlanException
      Create a new OAuth client that is not assigned to any personas.
      Parameters:
      client - connectivity to the Atlan tenant on which to create the new OAuth client
      displayName - readable name for the OAuth client
      role - workspace role the client should be bound to
      Returns:
      the OAuth client details
      Throws:
      AtlanException - on any API communication issues
    • create

      public static OAuthClient create(AtlanClient client, String displayName, String description, Set<String> personas, String role) throws AtlanException
      Create a new OAuth client with the provided details.
      Parameters:
      client - connectivity to the Atlan tenant on which to create the new OAuth client
      displayName - readable name for the OAuth client
      description - explanation of the OAuth client
      personas - unique names (qualifiedNames) of personas that should be linked to the client
      role - workspace role the client should be bound to
      Returns:
      the OAuth client details
      Throws:
      AtlanException - on any API communication issues
    • retrieveByName

      public static OAuthClient retrieveByName(AtlanClient client, String displayName) throws AtlanException
      Retrieves the OAuth client with a name that exactly matches the provided string.
      Parameters:
      client - connectivity to the Atlan tenant from which to retrieve the OAuth client
      displayName - name (as it appears in the UI) by which to retrieve the OAuth client
      Returns:
      the OAuth client whose name (in the UI) contains the provided string, or null if there is none
      Throws:
      AtlanException - on any error during API invocation
    • update

      public OAuthClient update(AtlanClient client) throws AtlanException
      Sends this OAuth client to Atlan to update it in Atlan. Note: only the displayName and description can currently be updated (for anything else, you need to create a new OAuth client).
      Parameters:
      client - connectivity to the Atlan tenant on which to update the OAuth client
      Returns:
      the updated OAuth client
      Throws:
      AtlanException - on any error during API invocation
    • delete

      public static void delete(AtlanClient client, String clientId) throws AtlanException
      Delete (purge) the OAuth client with the provided clientId.
      Parameters:
      client - connectivity to the Atlan tenant from which to remove the OAuth client
      clientId - unique identifier of the OAuth client to hard-delete
      Throws:
      AtlanException - on any API communication issues
    • builder

      public static OAuthClient.OAuthClientBuilder<?,?> builder()
    • toBuilder

      public OAuthClient.OAuthClientBuilder<?,?> toBuilder()
    • getId

      public String getId()
      Unique identifier (GUID) of the OAuth credential.
    • getClientId

      public String getClientId()
      Unique client identifier (prefixed GUID) of the OAuth client.
    • getClientSecret

      public String getClientSecret()
      Unique secret used to authorize exchanging for bearer tokens.
    • getDisplayName

      public String getDisplayName()
      Human-readable name provided when creating the client.
    • getCreatedAt

      public String getCreatedAt()
      Epoch time, in milliseconds, at which the OAuth client was created.
    • getCreatedBy

      public String getCreatedBy()
      User who created the OAuth client.
    • getDescription

      public String getDescription()
      Explanation of the OAuth client.
    • getPersonaQNs

      public List<String> getPersonaQNs()
      Unique names (qualifiedNames) of personas associated with the OAuth client.
    • getRole

      public String getRole()
      Name of the workspace role to which the OAuth client is bound.
    • getTokenExpirySeconds

      public Long getTokenExpirySeconds()
      Lifespan of each exchanged token for the OAuth client.
    • getUpdatedAt

      public String getUpdatedAt()
      Epoch time, in milliseconds, at which the OAuth client was last updated.
    • getUpdatedBy

      public String getUpdatedBy()
      User who last updated the OAuth client.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class AtlanObject
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class AtlanObject
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AtlanObject
    • toString

      public String toString()
      Description copied from class: AtlanObject
      Overrides:
      toString in class AtlanObject