Interface UserAuthenticationMethod
- All Known Implementing Classes:
HttpRequestAttributeAuthenticationMethod
,ResourceUserAuthenticationMethod
,SessionUserAuthenticationMethod
public interface UserAuthenticationMethod
Represents a supported authentication method. This returns an instance of
User
if authenticaion is
successful, and throws and instance of ForbiddenException
in theevent of a failure.
Created by patricktwohig on 6/26/17.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final UserAuthenticationMethod
The finalUserAuthenticationMethod
which returns the result ofUser.getUnprivileged()
. -
Method Summary
-
Field Details
-
UNPRIVILEGED
The finalUserAuthenticationMethod
which returns the result ofUser.getUnprivileged()
. This is guaranteed not to throw an exception.
-
-
Method Details
-
attempt
Attempts authorization. If authorization fails, then this must throw an instance ofForbiddenException
. Subsequence methods may be used before finally failing authentication with aForbiddenException
.- Returns:
- the
User
, never null - Throws:
ForbiddenException
-