Class MockAuthentication
java.lang.Object
net.officefloor.web.security.scheme.MockAuthentication
Mock authentication.
- Author:
- Daniel Sagenschneider
-
Constructor Summary
ConstructorsConstructorDescriptionMockAuthentication(AuthenticationContext<MockAccessControl, ?> authenticationContext) Instantiate. -
Method Summary
Modifier and TypeMethodDescriptionvoidauthenticate(MockCredentials credentials, Consumer<Throwable> completion) Undertakes authentication.Obtains theMockAccessControl.booleanIndicates if authenticated.voidUndertakes logout.
-
Constructor Details
-
MockAuthentication
Instantiate.- Parameters:
authenticationContext-AuthenticationContext.
-
-
Method Details
-
isAuthenticated
public boolean isAuthenticated()Indicates if authenticated.- Returns:
trueif authenticated.
-
authenticate
Undertakes authentication.- Parameters:
credentials-MockCredentials.completion- Optional completion listener.
-
getAccessControl
Obtains theMockAccessControl.- Returns:
MockAccessControl.
-
logout
Undertakes logout.- Parameters:
completion- Optional completion listener.
-