Class UsernamePasswordAuthenticationMechanism
- java.lang.Object
-
- org.wildfly.security.mechanism.http.UsernamePasswordAuthenticationMechanism
-
- All Implemented Interfaces:
org.wildfly.security.http.HttpServerAuthenticationMechanism
public abstract class UsernamePasswordAuthenticationMechanism extends Object implements org.wildfly.security.http.HttpServerAuthenticationMechanism
A base class for HTTP mechanisms that operate on validation of plain text usernames and passwords.- Author:
- Darran Lofthouse
-
-
Field Summary
Fields Modifier and Type Field Description protected CallbackHandlercallbackHandler
-
Constructor Summary
Constructors Modifier Constructor Description protectedUsernamePasswordAuthenticationMechanism(CallbackHandler callbackHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanauthenticate(String realmName, String username, char[] password)protected booleanauthorize(String username)protected voidfail()protected voidsucceed()
-
-
-
Field Detail
-
callbackHandler
protected final CallbackHandler callbackHandler
-
-
Constructor Detail
-
UsernamePasswordAuthenticationMechanism
protected UsernamePasswordAuthenticationMechanism(CallbackHandler callbackHandler)
- Parameters:
callbackHandler-
-
-
Method Detail
-
authenticate
protected boolean authenticate(String realmName, String username, char[] password) throws org.wildfly.security.http.HttpAuthenticationException
- Throws:
org.wildfly.security.http.HttpAuthenticationException
-
authorize
protected boolean authorize(String username) throws org.wildfly.security.http.HttpAuthenticationException
- Throws:
org.wildfly.security.http.HttpAuthenticationException
-
succeed
protected void succeed() throws IOException, UnsupportedCallbackException
-
fail
protected void fail() throws IOException, UnsupportedCallbackException
-
-