Package org.opendaylight.aaa.api
Interface CredentialAuth<T extends Credentials>
-
- All Known Subinterfaces:
PasswordCredentialAuth
- All Known Implementing Classes:
IdmLightProxy
,OSGIIdmLightProxy
public interface CredentialAuth<T extends Credentials>
An interface for direct authentication with some given credentials. Note this interface is not type-safe.- Author:
- liemmn
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Claim
authenticate(T cred)
Authenticate a claim with the given credentials and domain scope.@NonNull Class<T>
credentialClass()
Return the credential class that is required by this services.
-
-
-
Method Detail
-
authenticate
Claim authenticate(T cred) throws AuthenticationException
Authenticate a claim with the given credentials and domain scope.- Parameters:
cred
- credentials- Returns:
- authenticated claim
- Throws:
AuthenticationException
- if failed authenticationNullPointerException
- if credentials are null
-
credentialClass
@NonNull Class<T> credentialClass()
Return the credential class that is required by this services. This acts as a type check allowing discovery of the type at runtime.Note: this method should be defined in subclasses specializations for a particular credential class as a default (in case of an interface) or a final (in case of a class) method.
- Returns:
- Required credential class
-
-