Class MockAuthentication
- java.lang.Object
-
- net.officefloor.web.security.scheme.MockAuthentication
-
public class MockAuthentication extends java.lang.ObjectMock authentication.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description MockAuthentication(AuthenticationContext<MockAccessControl,?> authenticationContext)Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidauthenticate(MockCredentials credentials, java.util.function.Consumer<java.lang.Throwable> completion)Undertakes authentication.MockAccessControlgetAccessControl()Obtains theMockAccessControl.booleanisAuthenticated()Indicates if authenticated.voidlogout(java.util.function.Consumer<java.lang.Throwable> completion)Undertakes logout.
-
-
-
Constructor Detail
-
MockAuthentication
public MockAuthentication(AuthenticationContext<MockAccessControl,?> authenticationContext)
Instantiate.- Parameters:
authenticationContext-AuthenticationContext.
-
-
Method Detail
-
isAuthenticated
public boolean isAuthenticated()
Indicates if authenticated.- Returns:
trueif authenticated.
-
authenticate
public void authenticate(MockCredentials credentials, java.util.function.Consumer<java.lang.Throwable> completion)
Undertakes authentication.- Parameters:
credentials-MockCredentials.completion- Optional completion listener.
-
getAccessControl
public MockAccessControl getAccessControl()
Obtains theMockAccessControl.- Returns:
MockAccessControl.
-
logout
public void logout(java.util.function.Consumer<java.lang.Throwable> completion)
Undertakes logout.- Parameters:
completion- Optional completion listener.
-
-