public interface AuthnAuthority
Instances of this interface are typically registered with AdaptorContext.setAuthnAuthority(com.google.enterprise.adaptor.AuthnAuthority).
| Modifier and Type | Interface and Description |
|---|---|
static interface |
AuthnAuthority.Callback
Interface for replying to
AuthnAdaptor.authenticateUser(HttpExchange, Callback). |
| Modifier and Type | Method and Description |
|---|---|
void |
authenticateUser(HttpExchange ex,
AuthnAuthority.Callback callback)
Authenticate the user connected via
ex. |
void authenticateUser(HttpExchange ex, AuthnAuthority.Callback callback) throws IOException
ex. After attempting to
authenticate the user the implementation should respond by calling AuthnAuthority.Callback.userAuthenticated(com.sun.net.httpserver.HttpExchange, com.google.enterprise.adaptor.AuthnIdentity).
The implementation is expected to provide a response to the user with
ex. Since authentication commonly requires redirects, forms, and
other general HTTP mechanisms, full control is given to the implementation.
The implementation will likely need to use its own HttpHandlers that can be registered with AdaptorContext.createHttpContext(java.lang.String, com.sun.net.httpserver.HttpHandler).
If an implementation places callback in a session object, the
implementation should also remove the instance when userAuthenticated() is called. This is to release resources as well as
preventing re-use of the callback.
ex - exchange whose request body has been processed, but whose
response body and headers have not been sentcallback - object to receive and respond with authentication resultsIOException - on failure