Class IdentityAuthorization
java.lang.Object
org.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
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor used by superclasses.IdentityAuthorization(String identity) Creates a new instance of this class with given expected identity. -
Method Summary
Modifier and TypeMethodDescriptionvoidauthorize(GSSContext context, String host) Performs identity authorization.booleangetExpectedName(GSSCredential cred, String host) Returns expectedGSSNameused for authorization purposes.Returns the expected identity.inthashCode()voidsetIdentity(String identity) Sets the expected identity for the authorization check.Methods inherited from class Authorization
generateAuthorizationException
-
Field Details
-
logger
private static org.apache.commons.logging.Log logger -
_identity
-
-
Constructor Details
-
IdentityAuthorization
protected IdentityAuthorization()Constructor used by superclasses. -
IdentityAuthorization
Creates a new instance of this class with given expected identity.- Parameters:
identity- the expected identity. Must not be null.
-
-
Method Details
-
setIdentity
Sets the expected identity for the authorization check.- Parameters:
identity- the expected identity. Must not be null.
-
getIdentity
-
getExpectedName
Description copied from class:GSSAuthorizationReturns expectedGSSNameused for authorization purposes. Can returns null for self authorization.- Specified by:
getExpectedNamein classGSSAuthorization- Parameters:
cred- credentials usedhost- host address of the peer.- Throws:
GSSException- if unable to create the name.
-
authorize
Performs identity authorization. The given identity is compared with the peer's identity.- Specified by:
authorizein classAuthorization- Parameters:
context- the security contexthost- host address of the peer.- Throws:
AuthorizationException- if the peer's identity does not match the expected identity.
-
equals
-
hashCode
-