public class InternalAuthBackend extends java.lang.Object implements AuthBackend
Modifier and Type | Method and Description |
---|---|
AuthUser |
authenticate(AuthRequest req)
Authenticate inspects the AuthRequest and returns authenticated user.
|
java.lang.String |
getDomain() |
public java.lang.String getDomain()
getDomain
in interface AuthBackend
public AuthUser authenticate(AuthRequest req) throws MissingCredentialsException, InvalidCredentialsException, UnknownUserException, UserNotAllowedException, AuthException
AuthBackend
MissingCredentialsException
must be thrown when there are no
credentials for the request. It is expected that at most one AuthBackend
will either return an AuthUser or throw a non-MissingCredentialsException.authenticate
in interface AuthBackend
req
- the object describing the request.MissingCredentialsException
- when there are no credentials.InvalidCredentialsException
- when the credentials are present and
invalid.UnknownUserException
- when the credentials are valid but there is
no matching user.UserNotAllowedException
- when the credentials are valid but the user
is not allowed.AuthException
- when any other error occurs.