public IdentityAuthorization(java.lang.String identity)
Creates a new instance of this class with given
expected identity.
Parameters:
identity - the expected identity. Must not be null.
Method Detail
setIdentity
public void setIdentity(java.lang.String identity)
Sets the expected identity for the authorization
check.
Parameters:
identity - the expected identity. Must not be null.
getIdentity
public java.lang.String getIdentity()
Returns the expected identity.
Returns:
the expected identity.
getName
protected java.lang.String getName()
authorize
public void authorize(java.security.cert.X509Certificate[] chain,
java.net.Socket socket)
throws AuthorizationException
Performs identity authorization. The given identity is compared
with the peer's identity determined from the first (topmost)
certificate in the chain. The identities must match exactly
(in case-insensitive manner)