Apache CXF API

org.apache.cxf.rt.security.saml
Class SAMLSecurityContext

java.lang.Object
  extended by org.apache.cxf.rt.security.saml.SAMLSecurityContext
All Implemented Interfaces:
ClaimsSecurityContext, LoginSecurityContext, SecurityContext

public class SAMLSecurityContext
extends Object
implements ClaimsSecurityContext


Constructor Summary
SAMLSecurityContext(Principal principal)
           
SAMLSecurityContext(Principal principal, Set<Principal> roles)
           
SAMLSecurityContext(Principal principal, Set<Principal> roles, ClaimCollection claims)
           
 
Method Summary
 Element getAssertionElement()
           
 ClaimCollection getClaims()
           
 String getIssuer()
           
 Subject getSubject()
          Returns the Subject representing the current authenticated user.
 Principal getUserPrincipal()
           
 Set<Principal> getUserRoles()
          Returns a set of Principals representing the roles assigned to the current authenticated user Principal
 boolean isUserInRole(String role)
           
 void setAssertionElement(Element assertionElement)
           
 void setIssuer(String issuer)
           
 void setUserRoles(Set<Principal> userRoles)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAMLSecurityContext

public SAMLSecurityContext(Principal principal)

SAMLSecurityContext

public SAMLSecurityContext(Principal principal,
                           Set<Principal> roles)

SAMLSecurityContext

public SAMLSecurityContext(Principal principal,
                           Set<Principal> roles,
                           ClaimCollection claims)
Method Detail

getClaims

public ClaimCollection getClaims()
Specified by:
getClaims in interface ClaimsSecurityContext

getUserPrincipal

public Principal getUserPrincipal()
Specified by:
getUserPrincipal in interface SecurityContext

isUserInRole

public boolean isUserInRole(String role)
Specified by:
isUserInRole in interface SecurityContext

getSubject

public Subject getSubject()
Description copied from interface: LoginSecurityContext
Returns the Subject representing the current authenticated user.

Specified by:
getSubject in interface LoginSecurityContext
Returns:
the subject

setUserRoles

public void setUserRoles(Set<Principal> userRoles)

getUserRoles

public Set<Principal> getUserRoles()
Description copied from interface: LoginSecurityContext
Returns a set of Principals representing the roles assigned to the current authenticated user Principal

Specified by:
getUserRoles in interface LoginSecurityContext
Returns:
the roles

setAssertionElement

public void setAssertionElement(Element assertionElement)

getAssertionElement

public Element getAssertionElement()

setIssuer

public void setIssuer(String issuer)

getIssuer

public String getIssuer()

Apache CXF API

Apache CXF