org.keycloak.adapters.tomcat7

## Class CatalinaSecurityContextHelper

- java.lang.Object
- - org.keycloak.adapters.tomcat7.CatalinaSecurityContextHelper

-     public class CatalinaSecurityContextHelper
      extends Object

  Version:
    $Revision: 1 $
  Author:
    Davide Ungari

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CatalinaSecurityContextHelper()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Group` | `createGroup(String name, Set<Principal> principals)`
    `org.apache.catalina.realm.GenericPrincipal` | `createPrincipal(org.apache.catalina.Realm realm, Principal identity, Set<String> roleSet, KeycloakSecurityContext securityContext)`
    `protected Principal` | `getPrincipal(Subject subject)` Get the Principal given the authenticated Subject.
    `protected Group[]` | `getRoleSets(Collection<String> roleSet)`

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

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

- - ### Constructor Detail

    - #### CatalinaSecurityContextHelper

          public CatalinaSecurityContextHelper()

  - ### Method Detail

    - #### createPrincipal

          public org.apache.catalina.realm.GenericPrincipal createPrincipal(org.apache.catalina.Realm realm,
                                                                   Principal identity,
                                                                   Set<String> roleSet,
                                                                   KeycloakSecurityContext securityContext)

    - #### getPrincipal

          protected Principal getPrincipal(Subject subject)

      Get the Principal given the authenticated Subject. Currently the first subject that is not of type `Group` is considered or the single subject inside the CallerPrincipal group.
      Parameters:
        `subject` -
      Returns:
        the authenticated subject

    - #### createGroup

          protected Group createGroup(String name,
                          Set<Principal> principals)

    - #### getRoleSets

          protected Group[] getRoleSets(Collection<String> roleSet)

Copyright © 2015. All Rights Reserved.