org.acegisecurity.context
Interface SecurityContext

All Superinterfaces:
Serializable
All Known Subinterfaces:
CaptchaSecurityContext
All Known Implementing Classes:
CaptchaSecurityContextImpl, SecurityContextImpl

public interface SecurityContext
extends Serializable

Interface defining the minimum security information associated with the current thread of execution.

The security context is stored in a SecurityContextHolder.

Version:
$Id: SecurityContext.java,v 1.5 2005/11/17 00:55:49 benalex Exp $
Author:
Ben Alex

Method Summary
 Authentication getAuthentication()
          Obtains the currently authenticated principal, or an authentication request token.
 void setAuthentication(Authentication authentication)
          Changes the currently authenticated principal, or removes the authentication information.
 

Method Detail

setAuthentication

void setAuthentication(Authentication authentication)
Changes the currently authenticated principal, or removes the authentication information.

Parameters:
authentication - the new Authentication token, or null if no further authentication information should be stored

getAuthentication

Authentication getAuthentication()
Obtains the currently authenticated principal, or an authentication request token.

Returns:
the Authentication or null if no authentication information is available


Copyright © 2004-2005 Acegi Technology Pty Limited. All Rights Reserved.