RolePrefixSecurityContextImpl (Apache CXF JavaDoc 4.2.2 API)
Description: declaration: package: org.apache.cxf.interceptor.security, class: RolePrefixSecurityContextImpl

Package org.apache.cxf.interceptor.security

# Class RolePrefixSecurityContextImpl

java.lang.Object
org.apache.cxf.interceptor.security.RolePrefixSecurityContextImpl

All Implemented Interfaces:
  `LoginSecurityContext`, `SecurityContext`

public class RolePrefixSecurityContextImpl extends Object implements LoginSecurityContext

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RolePrefixSecurityContextImpl(Subject subject, String rolePrefix)`
  `RolePrefixSecurityContextImpl(Subject subject, String roleClassifier, String roleClassifierType)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### RolePrefixSecurityContextImpl

    public RolePrefixSecurityContextImpl(Subject subject, String rolePrefix)

  - ### RolePrefixSecurityContextImpl

    public RolePrefixSecurityContextImpl(Subject subject, String roleClassifier, String roleClassifierType)

- ## Method Details

  - ### 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

  - ### 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