com.google.enterprise.adaptor
Interface AuthnAuthority.Callback

Enclosing interface:
AuthnAuthority

public static interface AuthnAuthority.Callback

Interface for replying to AuthnAdaptor.authenticateUser(HttpExchange, Callback).


Method Summary
 void userAuthenticated(HttpExchange ex, AuthnIdentity identity)
          Respond with authentication information discovered during AuthnAdaptor.authenticateUser(HttpExchange, Callback).
 

Method Detail

userAuthenticated

void userAuthenticated(HttpExchange ex,
                       AuthnIdentity identity)
                       throws IOException
Respond with authentication information discovered during 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.

Parameters:
ex - exchange whose request body has been processed, but whose response body and headers have not been sent
identity - authenticated user identity information, or null
Throws:
IOException