Class OAuth2AccessTokenPrincipal
- java.lang.Object
-
- net.shibboleth.idp.plugin.authn.oidc.rp.principal.OAuth2AccessTokenPrincipal
-
- All Implemented Interfaces:
Cloneable,Principal,CloneablePrincipal
public class OAuth2AccessTokenPrincipal extends Object implements CloneablePrincipal
Principal based on an OAuth 2.0 access token.
-
-
Field Summary
Fields Modifier and Type Field Description private StringaccessTokenThe access_token.private StringaccessTokenTypeThe token_type.private DurationexpiresInThe duration in seconds when the access token expires.
-
Constructor Summary
Constructors Constructor Description OAuth2AccessTokenPrincipal(String token, String tokenType, Duration expiresInDuration)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuth2AccessTokenPrincipalclone()booleanequals(Object other)StringgetAccessTokenType()Get the token_type.DurationgetExpiresIn()Get the number of seconds since the response was generated the access_token expires.StringgetName()inthashCode()StringtoString()
-
-
-
Constructor Detail
-
OAuth2AccessTokenPrincipal
public OAuth2AccessTokenPrincipal(@Nonnull @NotEmpty @ParameterName(name="accessToken") String token, @Nonnull @NotEmpty @ParameterName(name="accessToken") String tokenType, @Nullable @ParameterName(name="expiresIn") Duration expiresInDuration)
Constructor.- Parameters:
token- the access_tokentokenType- the token_typeexpiresInDuration- the expires_in in seconds since the response was generated
-
-
Method Detail
-
getAccessTokenType
@Nonnull public String getAccessTokenType()
Get the token_type.- Returns:
- the token_type
-
getExpiresIn
@Nullable public Duration getExpiresIn()
Get the number of seconds since the response was generated the access_token expires.- Returns:
- the expires_in
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object other)
-
toString
public String toString()
-
clone
public OAuth2AccessTokenPrincipal clone() throws CloneNotSupportedException
- Specified by:
clonein interfaceCloneablePrincipal- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
-