Class UsernamePasswordAuthenticationMechanism
- java.lang.Object
-
- org.wildfly.security.mechanism.http.UsernamePasswordAuthenticationMechanism
-
- All Implemented Interfaces:
HttpServerAuthenticationMechanism
- Direct Known Subclasses:
BasicAuthenticationMechanism
,FormAuthenticationMechanism
public abstract class UsernamePasswordAuthenticationMechanism extends Object implements 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 CallbackHandler
callbackHandler
-
Constructor Summary
Constructors Modifier Constructor Description protected
UsernamePasswordAuthenticationMechanism(CallbackHandler callbackHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
authenticate(String realmName, String username, char[] password)
protected boolean
authorize(String username)
protected void
fail()
protected void
succeed()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.security.http.HttpServerAuthenticationMechanism
dispose, evaluateRequest, getMechanismName, getNegotiatedProperty, getNegotiationProperty
-
-
-
-
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 HttpAuthenticationException
- Throws:
HttpAuthenticationException
-
authorize
protected boolean authorize(String username) throws HttpAuthenticationException
- Throws:
HttpAuthenticationException
-
succeed
protected void succeed() throws IOException, UnsupportedCallbackException
-
fail
protected void fail() throws IOException, UnsupportedCallbackException
-
-