Package org.refcodes.net
Class BearerAuthCredentialsImpl
- java.lang.Object
-
- org.refcodes.net.BearerAuthCredentialsImpl
-
- All Implemented Interfaces:
org.refcodes.mixin.TokenAccessor
,org.refcodes.mixin.Validatable<BearerCredentials>
,AuthCredentials<BearerAuthCredentials,BearerCredentials>
,AuthTypeAccessor
,BearerAuthCredentials
,BearerCredentials
public class BearerAuthCredentialsImpl 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_BEARER_AUTH
-
-
Constructor Summary
Constructors Constructor Description BearerAuthCredentialsImpl()
Instantiates a new bearer auth credentials impl.BearerAuthCredentialsImpl(java.lang.String aSecret)
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 thisAuthCredentials
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 theAuthCredentials
instance.java.lang.String
toString()
-
Methods inherited from interface org.refcodes.net.BearerAuthCredentials
getAuthType, validate, validate, withHttpAuthorization
-
Methods inherited from interface org.refcodes.net.BearerCredentials
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 thisAuthCredentials
instance from theHeaderField.AUTHORIZATION
Header-Fields's value.- Specified by:
fromHttpAuthorization
in interfaceAuthCredentials<BearerAuthCredentials,BearerCredentials>
- Parameters:
aHttpAuthorization
- TheHeaderField.AUTHORIZATION
header field's value
-
toHttpAuthorization
public java.lang.String toHttpAuthorization()
Creates aHeaderField.AUTHORIZATION
HTTP Header-Field value from theAuthCredentials
instance.- Specified by:
toHttpAuthorization
in interfaceAuthCredentials<BearerAuthCredentials,BearerCredentials>
- Returns:
- The according HTTP Header-Field's value.
-
-