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 BearerToken
Creates a newBearerToken
from raw string representation for the given ui session id.Returns the wrapped raw format of the token.Returns the session id ornull
.static BearerToken
Creates a newBearerToken
from raw string representation.
-
Method Details
-
getCredentials
Returns the wrapped raw format of the token.- Specified by:
getCredentials
in interfaceorg.apache.shiro.authc.AuthenticationToken
-
getPrincipal
Returns the session id ornull
.- Specified by:
getPrincipal
in interfaceorg.apache.shiro.authc.AuthenticationToken
-
valueOf
Creates a newBearerToken
from raw string representation.- Parameters:
raw
- string representation
-
create
Creates a newBearerToken
from raw string representation for the given ui session id.- Parameters:
session
- session id of the clientrawToken
- bearer token string representation
-