站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 aspects API Documentation 英文版文档

SecurityContext (JBoss Aspects API) - JBoss 4.0.1 sp1 aspects API Documentation 英文版文档


org.jboss.aspects.security
Class SecurityContext

java.lang.Object
  extended byorg.jboss.aspects.security.SecurityContext

public class SecurityContext
extends Object

Obtain security information based on the current security domain.

Version:
$Revision: 1.2.2.1 $
Author:
Bill Burke

Field Summary
protected static ThreadLocal currentDomain
           
 
Constructor Summary
SecurityContext()
           
 
Method Summary
static Principal getCallerPrincipal()
          Get the caller's principal
static Principal getCurrentPrincipal()
          Get the current principal.
static boolean isCallerInRole(String roleName)
          Is the caller's security identity within the role

Does not include current run-as

static boolean isCurrentInRole(String roleName)
          Checks current identity is within roleName

Does include current run-as

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentDomain

protected static ThreadLocal currentDomain
Constructor Detail

SecurityContext

public SecurityContext()
Method Detail

getCallerPrincipal

public static Principal getCallerPrincipal()
Get the caller's principal

Returns:

getCurrentPrincipal

public static Principal getCurrentPrincipal()
Get the current principal. Could be run-as, or propagated

Returns:

isCallerInRole

public static boolean isCallerInRole(String roleName)
Is the caller's security identity within the role

Does not include current run-as

Parameters:
roleName -
Returns:

isCurrentInRole

public static boolean isCurrentInRole(String roleName)
Checks current identity is within roleName

Does include current run-as

Parameters:
roleName -
Returns:


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.