public class IdentityAuthorization extends GSSAuthorization
Modifier | Constructor and Description |
---|---|
protected |
IdentityAuthorization()
Constructor used by superclasses.
|
|
IdentityAuthorization(String identity)
Creates a new instance of this class with given
expected identity.
|
Modifier and Type | Method and Description |
---|---|
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.
|
generateAuthorizationException
protected String _identity
protected IdentityAuthorization()
public IdentityAuthorization(String identity)
identity
- the expected identity. Must not be null.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.Copyright © 2016. All rights reserved.