Package org.refcodes.net
Interface BearerCredentials
-
- All Superinterfaces:
org.refcodes.mixin.TokenAccessor
,org.refcodes.mixin.Validatable<BearerCredentials>
- All Known Subinterfaces:
BearerAuthCredentials
- All Known Implementing Classes:
BearerAuthCredentialsImpl
,BearerCredentialsImpl
public interface BearerCredentials extends org.refcodes.mixin.TokenAccessor, org.refcodes.mixin.Validatable<BearerCredentials>
The Interface BearerCredentials.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default boolean
isValid(java.lang.String aToken)
Validates the provided user-name and secret against thisBearerCredentials
user-name and secret.default boolean
isValid(BearerCredentials aCredentials)
Validates the providedBearerCredentials
against thisBearerCredentials
user-name and secret.
-
-
-
Method Detail
-
isValid
default boolean isValid(BearerCredentials aCredentials)
Validates the providedBearerCredentials
against thisBearerCredentials
user-name and secret. If thisBearerCredentials
instance's user-name or password are null, then false is returned.- Specified by:
isValid
in interfaceorg.refcodes.mixin.Validatable<BearerCredentials>
- Parameters:
aCredentials
- TheBearerCredentials
to be tested if them fit with the thisBearerCredentials
instance.- Returns:
- True if the
BearerCredentials
match with the thisBearerCredentials
instance and thisBasicAuthCredentials
instance's user-name and secret are not null.
-
isValid
default boolean isValid(java.lang.String aToken)
Validates the provided user-name and secret against thisBearerCredentials
user-name and secret. If thisBearerCredentials
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
BearerCredentials
instance and thisBasicAuthCredentials
instance's user-name and secret are not null.
-
-