Package org.wildfly.security.credential
Class BearerTokenCredential
- java.lang.Object
-
- org.wildfly.security.credential.BearerTokenCredential
-
- All Implemented Interfaces:
Cloneable,Credential
public final class BearerTokenCredential extends Object implements Credential
ACredentialthat usually holds a bearer security token.- Author:
- Pedro Igor
-
-
Field Summary
-
Fields inherited from interface org.wildfly.security.credential.Credential
NO_CREDENTIALS
-
-
Constructor Summary
Constructors Constructor Description BearerTokenCredential(String token)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BearerTokenCredentialclone()Creates and returns a copy of thisCredential.booleanequals(Object obj)StringgetToken()Get the bearer security token.inthashCode()-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.security.credential.Credential
canVerify, canVerify, castAndApply, castAndApply, castAndApply, castAs, castAs, castAs, matches, matches, matches, verify, verify
-
-
-
-
Constructor Detail
-
BearerTokenCredential
public BearerTokenCredential(String token)
Construct a new instance.- Parameters:
token- the bearer security token (must not benull)
-
-
Method Detail
-
getToken
public String getToken()
Get the bearer security token.- Returns:
- the bearer security token
-
clone
public BearerTokenCredential clone()
Description copied from interface:CredentialCreates and returns a copy of thisCredential.- Specified by:
clonein interfaceCredential- Overrides:
clonein classObject- Returns:
- a copy of this
Credential.
-
-