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
ACredential
that 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 BearerTokenCredential
clone()
Creates and returns a copy of thisCredential
.boolean
equals(Object obj)
String
getToken()
Get the bearer security token.int
hashCode()
-
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:Credential
Creates and returns a copy of thisCredential
.- Specified by:
clone
in interfaceCredential
- Overrides:
clone
in classObject
- Returns:
- a copy of this
Credential
.
-
-