Class MockAuthentication
- java.lang.Object
-
- net.officefloor.web.security.scheme.MockAuthentication
-
public class MockAuthentication extends java.lang.Object
Mock 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 void
authenticate(MockCredentials credentials, java.util.function.Consumer<java.lang.Throwable> completion)
Undertakes authentication.MockAccessControl
getAccessControl()
Obtains theMockAccessControl
.boolean
isAuthenticated()
Indicates if authenticated.void
logout(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:
true
if 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.
-
-