protected Map < String , List < Object > > getPrincipalAttributesFromReleasePolicy ( final Principal p , final Service service , final RegisteredService registeredService ) { if ( registeredService != null && registeredService . getAccessStrategy ( ) . isServiceAccessAllowed ( ) ) { LOGGER . debug ( "Located service [{}] in the registry. Attempting to resolve attributes for [{}]" , registeredService , p . getId ( ) ) ; if ( registeredService . getAttributeReleasePolicy ( ) == null ) { LOGGER . debug ( "No attribute release policy is defined for [{}]. Returning default principal attributes" , service . getId ( ) ) ; return p . getAttributes ( ) ; } return registeredService . getAttributeReleasePolicy ( ) . getAttributes ( p , service , registeredService ) ; } LOGGER . debug ( "Could not locate service [{}] in the registry." , service . getId ( ) ) ; throw new UnauthorizedServiceException ( UnauthorizedServiceException . CODE_UNAUTHZ_SERVICE ) ; }
Gets principal attributes . Will attempt to locate the principal attribute repository from the context if one is defined to use that instance to locate attributes . If none is available will use the default principal attributes .