public class BearerAuthenticationToken extends Object implements AuthenticationToken
AuthenticationToken
representing a Bearer authententication token.
This AuthenticationToken returns always null
from getPrincipal()
and returns the token from
getCredentials()
.
AuthenticationToken.AuthenticationTokenResolver<R extends Message>
CredentialsContainer.CredentialsMatcher
Constructor and Description |
---|
BearerAuthenticationToken(String token)
Construct a new BearerAuthenticationToken
|
Modifier and Type | Method and Description |
---|---|
static BearerAuthenticationToken |
create(String token)
Create a new
BearerAuthenticationToken with given token. |
Object |
getCredentials()
Returns the credentials submitted during the authentication process that verifies the submitted
AuthenticationToken.getPrincipal() account identity. |
Object |
getPrincipal()
Get the principal to which this authentication token refers, i.e. the account identity submitted during the
authentication process.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accountCredentials, bearer, httpBasicResolver, httpBearerResolver
defaultMatcher
public BearerAuthenticationToken(String token)
token
- Bearer token valuepublic Object getPrincipal()
AuthenticationToken
getPrincipal
in interface AuthenticationToken
public Object getCredentials()
AuthenticationToken
AuthenticationToken.getPrincipal()
account identity.getCredentials
in interface AuthenticationToken
getCredentials
in interface CredentialsContainer
public static BearerAuthenticationToken create(String token)
BearerAuthenticationToken
with given token.token
- Bearer tokenBearerAuthenticationToken
with given credentialsCopyright © 2018 The Holon Platform. All rights reserved.