|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.globus.gsi.gssapi.auth.Authorization
org.globus.gsi.gssapi.auth.GSSAuthorization
org.globus.gsi.gssapi.auth.IdentityAuthorization
Implements a simple identity authorization mechanism. The given identify is compared with the peer's identity.
Field Summary | |
protected String |
_identity
|
Constructor Summary | |
protected |
IdentityAuthorization()
Constructor used by superclasses. |
|
IdentityAuthorization(String identity)
Creates a new instance of this class with given expected identity. |
Method Summary | |
void |
authorize(GSSContext context,
String host)
Performs identity authorization. |
boolean |
equals(Object o)
|
GSSName |
getExpectedName(GSSCredential cred,
String host)
Returns expected GSSName used for authorization purposes. |
String |
getIdentity()
Returns the expected identity. |
int |
hashCode()
|
void |
setIdentity(String identity)
Sets the expected identity for the authorization check. |
Methods inherited from class org.globus.gsi.gssapi.auth.Authorization |
generateAuthorizationException |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected String _identity
Constructor Detail |
protected IdentityAuthorization()
public IdentityAuthorization(String identity)
identity
- the expected identity. Must not be null.Method Detail |
public void setIdentity(String identity)
identity
- the expected identity. Must not be null.public String getIdentity()
public GSSName getExpectedName(GSSCredential cred, String host) throws GSSException
GSSAuthorization
GSSName
used for authorization purposes.
Can returns null for self authorization.
getExpectedName
in class GSSAuthorization
cred
- credentials usedhost
- host address of the peer.
GSSException
- if unable to create the name.public void authorize(GSSContext context, String host) throws AuthorizationException
authorize
in class Authorization
context
- the security contexthost
- host address of the peer.
AuthorizationException
- if the peer's
identity does not match the expected identity.public boolean equals(Object o)
public int hashCode()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |