- All Superinterfaces:
org.refcodes.mixin.TokenAccessor
,org.refcodes.mixin.Validatable<TokenCredentials>
- All Known Implementing Classes:
BearerAuthCredentials
public interface TokenCredentials
extends org.refcodes.mixin.TokenAccessor, org.refcodes.mixin.Validatable<TokenCredentials>
The Interface TokenCredentials.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.mixin.TokenAccessor
org.refcodes.mixin.TokenAccessor.TokenBuilder<B extends org.refcodes.mixin.TokenAccessor.TokenBuilder<B>>, org.refcodes.mixin.TokenAccessor.TokenMutator, org.refcodes.mixin.TokenAccessor.TokenProperty
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Validates the provided user-name and secret against thisTokenCredentials
user-name and secret.default boolean
isValid
(TokenCredentials aCredentials) Validates the providedTokenCredentials
against thisTokenCredentials
user-name and secret.Methods inherited from interface org.refcodes.mixin.TokenAccessor
getToken
-
Method Details
-
isValid
Validates the providedTokenCredentials
against thisTokenCredentials
user-name and secret. If thisTokenCredentials
instance's user-name or password are null, then false is returned.- Specified by:
isValid
in interfaceorg.refcodes.mixin.Validatable<TokenCredentials>
- Parameters:
aCredentials
- TheTokenCredentials
to be tested if them fit with the thisTokenCredentials
instance.- Returns:
- True if the
TokenCredentials
match with the thisTokenCredentials
instance and thisBasicAuthCredentials
instance's user-name and secret are not null.
-
isValid
Validates the provided user-name and secret against thisTokenCredentials
user-name and secret. If thisTokenCredentials
instance's user-name or password are null, then false is returned.- Parameters:
aToken
- the token- Returns:
- True if the user-name and secret match with the this
TokenCredentials
instance and thisBasicAuthCredentials
instance's user-name and secret are not null.
-