org.springframework.security.extensions.kerberos
Class KerberosServiceRequestToken

java.lang.Object
  extended by org.springframework.security.authentication.AbstractAuthenticationToken
      extended by org.springframework.security.extensions.kerberos.KerberosServiceRequestToken
All Implemented Interfaces:
Serializable, Principal, Authentication

public class KerberosServiceRequestToken
extends AbstractAuthenticationToken

Holds the Kerberos/SPNEGO token for requesting a kerberized service and is also the output of KerberosServiceAuthenticationProvider.
Will mostly be created in SpnegoAuthenticationProcessingFilter and authenticated in KerberosServiceAuthenticationProvider. This token cannot be re-authenticated, as you will get a Kerberos Reply error.

Since:
1.0
Version:
$Id: KerberosServiceRequestToken.java 35 2009-09-03 18:15:03Z mwiesner $
Author:
Mike Wiesner
See Also:
KerberosServiceAuthenticationProvider, SpnegoAuthenticationProcessingFilter, Serialized Form

Constructor Summary
KerberosServiceRequestToken(byte[] token)
          Creates an unauthenticated instance which should then be authenticated by KerberosServiceAuthenticationProvider/code>
KerberosServiceRequestToken(Object principal, List<GrantedAuthority> authorities, byte[] token)
          Creates an authenticated token, normally used as an output of an authentication provider.
 
Method Summary
 boolean equals(Object obj)
          equals() is based only on the Kerberos token
 Object getCredentials()
           
 Object getPrincipal()
           
 byte[] getToken()
          Returns the Kerberos token
 int hashCode()
          Calculates hashcode based on the Kerberos token
 
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
getAuthorities, getDetails, getName, isAuthenticated, setAuthenticated, setDetails, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KerberosServiceRequestToken

public KerberosServiceRequestToken(Object principal,
                                   List<GrantedAuthority> authorities,
                                   byte[] token)
Creates an authenticated token, normally used as an output of an authentication provider.

Parameters:
principal - the user principal (mostly of instance UserDetails
authorities - the authorities which are granted to the user
token - the Kerberos/SPNEGO token
See Also:
UserDetails

KerberosServiceRequestToken

public KerberosServiceRequestToken(byte[] token)
Creates an unauthenticated instance which should then be authenticated by KerberosServiceAuthenticationProvider/code>

Parameters:
token - Kerberos/SPNEGO token
See Also:
KerberosServiceAuthenticationProvider
Method Detail

hashCode

public int hashCode()
Calculates hashcode based on the Kerberos token

Specified by:
hashCode in interface Principal
Overrides:
hashCode in class AbstractAuthenticationToken

equals

public boolean equals(Object obj)
equals() is based only on the Kerberos token

Specified by:
equals in interface Principal
Overrides:
equals in class AbstractAuthenticationToken

getCredentials

public Object getCredentials()

getPrincipal

public Object getPrincipal()

getToken

public byte[] getToken()
Returns the Kerberos token



Copyright © 2009 SpringSource, Inc. All Rights Reserved.