Class Token
java.lang.Object
com.linecorp.centraldogma.server.metadata.Token
- All Implemented Interfaces:
Identifiable
Specifies details of an application token.
-
Constructor Summary
ConstructorDescriptionToken
(String appId, String secret, Boolean isAdmin, Boolean isSystemAdmin, UserAndTimestamp creation, UserAndTimestamp deactivation, UserAndTimestamp deletion) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionappId()
Returns the ID of the application.creation()
Returns who created this token when.Returns who deactivated this token when.deletion()
Returns who deleted this token when.id()
Returns theString
-formatted identifier.boolean
isActive()
Returns whether this token is activated.boolean
Returns whether this token is deleted.boolean
Returns whether this token has system administrative privileges.secret()
Returns the secret.toString()
Returns a newToken
instance without its secret.withSystemAdmin
(boolean isSystemAdmin) Returns a newToken
instance without its secret.
-
Constructor Details
-
Token
public Token(String appId, String secret, @Nullable Boolean isAdmin, @Nullable Boolean isSystemAdmin, UserAndTimestamp creation, @Nullable UserAndTimestamp deactivation, @Nullable UserAndTimestamp deletion) Creates a new instance.
-
-
Method Details
-
id
Description copied from interface:Identifiable
Returns theString
-formatted identifier.- Specified by:
id
in interfaceIdentifiable
-
appId
Returns the ID of the application. -
secret
Returns the secret. -
isSystemAdmin
public boolean isSystemAdmin()Returns whether this token has system administrative privileges. -
creation
Returns who created this token when. -
deactivation
Returns who deactivated this token when. -
deletion
Returns who deleted this token when. -
isActive
public boolean isActive()Returns whether this token is activated. -
isDeleted
public boolean isDeleted()Returns whether this token is deleted. -
toString
-
withoutSecret
Returns a newToken
instance without its secret. -
withSystemAdmin
Returns a newToken
instance without its secret. This method must be called by the token whose secret is not null.
-