- 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 booleanValidates the provided user-name and secret against thisTokenCredentialsuser-name and secret.default booleanisValid(TokenCredentials aCredentials) Validates the providedTokenCredentialsagainst thisTokenCredentialsuser-name and secret.Methods inherited from interface org.refcodes.mixin.TokenAccessor
getToken
-
Method Details
-
isValid
Validates the providedTokenCredentialsagainst thisTokenCredentialsuser-name and secret. If thisTokenCredentialsinstance's user-name or password are null, then false is returned.- Specified by:
isValidin interfaceorg.refcodes.mixin.Validatable<TokenCredentials>- Parameters:
aCredentials- TheTokenCredentialsto be tested if them fit with the thisTokenCredentialsinstance.- Returns:
- True if the
TokenCredentialsmatch with the thisTokenCredentialsinstance and thisBasicAuthCredentialsinstance's user-name and secret are not null.
-
isValid
Validates the provided user-name and secret against thisTokenCredentialsuser-name and secret. If thisTokenCredentialsinstance'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
TokenCredentialsinstance and thisBasicAuthCredentialsinstance's user-name and secret are not null.
-