Package sonia.scm.security
Class BearerToken
java.lang.Object
sonia.scm.security.BearerToken
- All Implemented Interfaces:
Serializable,org.apache.shiro.authc.AuthenticationToken
Token used for authentication with bearer tokens.
- Since:
- 2.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic BearerTokenCreates a newBearerTokenfrom raw string representation for the given ui session id.Returns the wrapped raw format of the token.Returns the session id ornull.static BearerTokenCreates a newBearerTokenfrom raw string representation.
-
Method Details
-
getCredentials
Returns the wrapped raw format of the token.- Specified by:
getCredentialsin interfaceorg.apache.shiro.authc.AuthenticationToken
-
getPrincipal
Returns the session id ornull.- Specified by:
getPrincipalin interfaceorg.apache.shiro.authc.AuthenticationToken
-
valueOf
Creates a newBearerTokenfrom raw string representation.- Parameters:
raw- string representation
-
create
Creates a newBearerTokenfrom raw string representation for the given ui session id.- Parameters:
session- session id of the clientrawToken- bearer token string representation
-