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 classDataRadarToken.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Set<AuthorityReference>rolesprivate final Set<String>scopesprivate final List<String>sourcesprivate final StringgrantTypeprivate final Stringsubjectprivate final Stringusernameprivate final InstantissuedAtprivate final InstantexpiresAtprivate final List<String>audienceprivate final Stringtokenprivate final Stringissuerprivate final Stringtypeprivate final StringclientIdprivate final BooleanisClientCredentialspublic final static DataRadarToken.CompanionCompanion
-
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. StringgetGrantType()Get this token's OAuth2 grant type. StringgetSubject()Get the token subject. StringgetUsername()Get the token username. InstantgetIssuedAt()Get the date this token was issued. InstantgetExpiresAt()Get the date this token expires. List<String>getAudience()Get the audience of the token. StringgetToken()Get a string representation of this token. StringgetIssuer()Get the issuer. StringgetType()Get the token type. StringgetClientId()Client that the token is associated to. DataRadarTokencopyWithRoles(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)
-
-
-
-