Package org.refcodes.net
Class BeararAuthCredentialsImpl
- java.lang.Object
-
- org.refcodes.net.BeararAuthCredentialsImpl
-
- All Implemented Interfaces:
org.refcodes.mixin.TokenAccessor
,org.refcodes.mixin.Validatable<TokenCredentials>
,AuthTypeAccessor
,AuthTypeCredentials<BearerAuthCredentials,TokenCredentials>
,BearerAuthCredentials
,TokenCredentials
public class BeararAuthCredentialsImpl extends java.lang.Object implements BearerAuthCredentials
Implementation of theBearerAuthCredentials
interface.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.net.AuthTypeAccessor
AuthTypeAccessor.AuthTypeBuilder<B extends AuthTypeAccessor.AuthTypeBuilder<B>>, AuthTypeAccessor.AuthTypeMutator, AuthTypeAccessor.AuthTypeProperty
-
-
Field Summary
-
Fields inherited from interface org.refcodes.net.BearerAuthCredentials
DELIMITER_AUTH_TYPE
-
-
Constructor Summary
Constructors Constructor Description BeararAuthCredentialsImpl()
Instantiates a new bearer auth credentials impl.BeararAuthCredentialsImpl(java.lang.String aToken)
Instantiates a new bearer auth credentials impl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
void
fromHttpAuthorization(java.lang.String aHttpAuthorization)
Initializes thisAuthTypeCredentials
instance from theHeaderField.AUTHORIZATION
Header-Fields's value.java.lang.String
getToken()
int
hashCode()
java.lang.String
toHttpAuthorization()
Creates aHeaderField.AUTHORIZATION
HTTP Header-Field value from theAuthTypeCredentials
instance.java.lang.String
toString()
-
Methods inherited from interface org.refcodes.net.BearerAuthCredentials
getAuthType, validate, validate, withHttpAuthorization
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.refcodes.net.TokenCredentials
isValid, isValid
-
-
-
-
Method Detail
-
getToken
public java.lang.String getToken()
- Specified by:
getToken
in interfaceorg.refcodes.mixin.TokenAccessor
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
fromHttpAuthorization
public void fromHttpAuthorization(java.lang.String aHttpAuthorization)
Initializes thisAuthTypeCredentials
instance from theHeaderField.AUTHORIZATION
Header-Fields's value.- Specified by:
fromHttpAuthorization
in interfaceAuthTypeCredentials<BearerAuthCredentials,TokenCredentials>
- Parameters:
aHttpAuthorization
- TheHeaderField.AUTHORIZATION
header field's value
-
toHttpAuthorization
public java.lang.String toHttpAuthorization()
Creates aHeaderField.AUTHORIZATION
HTTP Header-Field value from theAuthTypeCredentials
instance.- Specified by:
toHttpAuthorization
in interfaceAuthTypeCredentials<BearerAuthCredentials,TokenCredentials>
- Returns:
- The according HTTP Header-Field's value.
-
-