Package net.officefloor.web.security
Interface HttpAuthentication<C>
- All Known Implementing Classes:
AnonymousHttpSecuritySource,HttpAuthenticationImpl,MockHttpAuthentication
public interface HttpAuthentication<C>
Dependency interface allowing the application to check if the HTTP client is
authenticated.
- Author:
- Daniel Sagenschneider
-
Method Summary
Modifier and TypeMethodDescriptionvoidauthenticate(C credentials, AuthenticateRequest authenticateRequest) Triggers to undertake authentication.Obtains theHttpAccessControl.Obtains the type of credentials.booleanIndicates if authenticated.voidlogout(LogoutRequest logoutRequest) Undertakes logging out.
-
Method Details
-
isAuthenticated
Indicates if authenticated.- Returns:
trueif authenticated.- Throws:
HttpException- If authentication has been attempted but there were failures in undertaking authentication.
-
getCredentialsType
Obtains the type of credentials.- Returns:
- Type of credentials.
-
authenticate
Triggers to undertake authentication.- Parameters:
credentials- Credentials. May benullif no credentials are required, or they are pulled from theHttpRequest.authenticateRequest-AuthenticateRequest.
-
getAccessControl
Obtains theHttpAccessControl.- Returns:
HttpAccessControl.- Throws:
AuthenticationRequiredException- If not authenticated.HttpException- If failure occurred in authentication.
-
logout
Undertakes logging out.- Parameters:
logoutRequest-LogoutRequest.
-