Package org.radarbase.auth.token
Class DataRadarToken
-
- All Implemented Interfaces:
-
java.io.Serializable
,org.radarbase.auth.token.RadarToken
public final class DataRadarToken implements RadarToken, Serializable
Created by dverbeec on 10/01/2018.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
DataRadarToken.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Set<AuthorityReference>
roles
private final Set<String>
scopes
private final List<String>
sources
private final String
grantType
private final String
subject
private final String
username
private final Instant
issuedAt
private final Instant
expiresAt
private final List<String>
audience
private final String
token
private final String
issuer
private final String
type
private final String
clientId
private final Boolean
isClientCredentials
public final static DataRadarToken.Companion
Companion
-
Constructor Summary
Constructors Constructor Description DataRadarToken(RadarToken radarToken)
DataRadarToken(Set<AuthorityReference> roles, Set<String> scopes, List<String> sources, String grantType, String subject, String username, Instant issuedAt, Instant expiresAt, List<String> audience, String token, String issuer, String type, String clientId)
-
Method Summary
Modifier and Type Method Description Set<AuthorityReference>
getRoles()
Get all roles defined in this token. Set<String>
getScopes()
Get a list of scopes assigned to this token. List<String>
getSources()
Get a list of source names associated with this token. String
getGrantType()
Get this token's OAuth2 grant type. String
getSubject()
Get the token subject. String
getUsername()
Get the token username. Instant
getIssuedAt()
Get the date this token was issued. Instant
getExpiresAt()
Get the date this token expires. List<String>
getAudience()
Get the audience of the token. String
getToken()
Get a string representation of this token. String
getIssuer()
Get the issuer. String
getType()
Get the token type. String
getClientId()
Client that the token is associated to. DataRadarToken
copyWithRoles(Set<AuthorityReference> roles)
-
-
Constructor Detail
-
DataRadarToken
DataRadarToken(RadarToken radarToken)
-
-
Method Detail
-
getRoles
Set<AuthorityReference> getRoles()
Get all roles defined in this token.
-
getSources
List<String> getSources()
Get a list of source names associated with this token.
-
getGrantType
String getGrantType()
Get this token's OAuth2 grant type.
-
getSubject
String getSubject()
Get the token subject.
-
getUsername
String getUsername()
Get the token username.
-
getIssuedAt
Instant getIssuedAt()
Get the date this token was issued.
-
getExpiresAt
Instant getExpiresAt()
Get the date this token expires.
-
getAudience
List<String> getAudience()
Get the audience of the token.
-
getClientId
String getClientId()
Client that the token is associated to.
-
copyWithRoles
DataRadarToken copyWithRoles(Set<AuthorityReference> roles)
-
-
-
-