Package org.jolokia.jvmagent.security
Class MultiAuthenticator
- java.lang.Object
-
- com.sun.net.httpserver.Authenticator
-
- org.jolokia.jvmagent.security.MultiAuthenticator
-
public class MultiAuthenticator extends Authenticator
Authenticator encapsulating multiple other authenticators whose results are combined to a single one, depending on the given mode- Mode.ALL : All authenticators must succeed for this authenticator to succeed
- Mode.ANY : A single successful authenticator is sufficient for this authenticator to succeed
- Since:
- 26.05.14
- Author:
- roland, nevenr
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MultiAuthenticator.Mode
How to combine multiple authenticators-
Nested classes/interfaces inherited from class com.sun.net.httpserver.Authenticator
Authenticator.Failure, Authenticator.Result, Authenticator.Retry, Authenticator.Success
-
-
Constructor Summary
Constructors Constructor Description MultiAuthenticator(MultiAuthenticator.Mode mode, List<Authenticator> authenticators)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Authenticator.Result
authenticate(HttpExchange httpExchange)
Authenticate against the given request
-
-
-
Constructor Detail
-
MultiAuthenticator
public MultiAuthenticator(MultiAuthenticator.Mode mode, List<Authenticator> authenticators)
-
-
Method Detail
-
authenticate
public Authenticator.Result authenticate(HttpExchange httpExchange)
Authenticate against the given request- Specified by:
authenticate
in classAuthenticator
- Parameters:
httpExchange
- request and response object- Returns:
- the result of the first authenticator that does succeed, or the last failure result.
-
-