org.globus.gsi.gssapi.auth
Class HostOrSelfAuthorization

java.lang.Object
  extended by org.globus.gsi.gssapi.auth.Authorization
      extended by org.globus.gsi.gssapi.auth.GSSAuthorization
          extended by org.globus.gsi.gssapi.auth.HostOrSelfAuthorization

public class HostOrSelfAuthorization
extends GSSAuthorization


Constructor Summary
HostOrSelfAuthorization(java.lang.String service)
           
 
Method Summary
 void authorize(org.ietf.jgss.GSSContext context, java.lang.String host)
          Performs host authorization.
 org.ietf.jgss.GSSName getExpectedName(org.ietf.jgss.GSSCredential cred, java.lang.String host)
          Returns expected GSSName used for authorization purposes.
static HostOrSelfAuthorization getInstance()
          Returns a single instance of this class.
 
Methods inherited from class org.globus.gsi.gssapi.auth.Authorization
generateAuthorizationException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostOrSelfAuthorization

public HostOrSelfAuthorization(java.lang.String service)
Method Detail

getInstance

public static HostOrSelfAuthorization getInstance()
Returns a single instance of this class.

Returns:
the instance of this class.

getExpectedName

public org.ietf.jgss.GSSName getExpectedName(org.ietf.jgss.GSSCredential cred,
                                             java.lang.String host)
                                      throws org.ietf.jgss.GSSException
Description copied from class: GSSAuthorization
Returns expected GSSName used for authorization purposes. Can returns null for self authorization.

Specified by:
getExpectedName in class GSSAuthorization
Parameters:
cred - credentials used
host - host address of the peer.
Throws:
org.ietf.jgss.GSSException - if unable to create the name.

authorize

public void authorize(org.ietf.jgss.GSSContext context,
                      java.lang.String host)
               throws AuthorizationException
Performs host authorization. If that fails, performs self authorization

Specified by:
authorize in class Authorization
Parameters:
context - the securit context
host - host address of the peer.
Throws:
AuthorizationException - if the peer is not authorized to access/use the resource.


Copyright © 2013. All Rights Reserved.