public class IdentityAuthorization extends GSSAuthorization
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
_identity |
| Modifier | Constructor and Description |
|---|---|
protected |
IdentityAuthorization()
Constructor used by superclasses.
|
|
IdentityAuthorization(java.lang.String identity)
Creates a new instance of this class with given
expected identity.
|
| Modifier and Type | Method and Description |
|---|---|
void |
authorize(org.ietf.jgss.GSSContext context,
java.lang.String host)
Performs identity authorization.
|
boolean |
equals(java.lang.Object o) |
org.ietf.jgss.GSSName |
getExpectedName(org.ietf.jgss.GSSCredential cred,
java.lang.String host)
Returns expected
GSSName used for authorization purposes. |
java.lang.String |
getIdentity()
Returns the expected identity.
|
int |
hashCode() |
void |
setIdentity(java.lang.String identity)
Sets the expected identity for the authorization
check.
|
generateAuthorizationExceptionprotected IdentityAuthorization()
public IdentityAuthorization(java.lang.String identity)
identity - the expected identity. Must not be null.public void setIdentity(java.lang.String identity)
identity - the expected identity. Must not be null.public java.lang.String getIdentity()
public org.ietf.jgss.GSSName getExpectedName(org.ietf.jgss.GSSCredential cred,
java.lang.String host)
throws org.ietf.jgss.GSSException
GSSAuthorizationGSSName used for authorization purposes.
Can returns null for self authorization.getExpectedName in class GSSAuthorizationcred - credentials usedhost - host address of the peer.org.ietf.jgss.GSSException - if unable to create the name.public void authorize(org.ietf.jgss.GSSContext context,
java.lang.String host)
throws AuthorizationException
authorize in class Authorizationcontext - the security contexthost - host address of the peer.AuthorizationException - if the peer's
identity does not match the expected identity.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2013. All Rights Reserved.