public class HostOrSelfAuthorization extends GSSAuthorization
Constructor and Description |
---|
HostOrSelfAuthorization(String service) |
Modifier and Type | Method and Description |
---|---|
void |
authorize(GSSContext context,
String host)
Performs host authorization.
|
GSSName |
getExpectedName(GSSCredential cred,
String host)
Returns expected
GSSName used for authorization purposes. |
static HostOrSelfAuthorization |
getInstance()
Returns a single instance of this class.
|
generateAuthorizationException
public HostOrSelfAuthorization(String service)
public static HostOrSelfAuthorization getInstance()
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 securit contexthost
- host address of the peer.AuthorizationException
- if the peer is
not authorized to access/use the resource.Copyright © 2016. All rights reserved.