public static interface AuthnAuthority.Callback
AuthnAdaptor.authenticateUser(HttpExchange, Callback)
.Modifier and Type | Method and Description |
---|---|
void |
userAuthenticated(HttpExchange ex,
AuthnIdentity identity)
Respond with authentication information discovered during
AuthnAdaptor.authenticateUser(HttpExchange, Callback) . |
void userAuthenticated(HttpExchange ex, AuthnIdentity identity) throws IOException
AuthnAdaptor.authenticateUser(HttpExchange, Callback)
.
The exchange ex
does not need to be the same instance provided to
authenticateUser()
, but it does need to be a connection to the
same client. This method provides a response to the client using ex
, so the exchange should not have had its headers sent and should be
considered completed after the method returns.
If authentication failed, then identity should be null
. If an
identity
is provided, its username must not be null
or
empty.
ex
- exchange whose request body has been processed, but whose
response body and headers have not been sentidentity
- authenticated user identity information, or null
IOException
- on failure