private void syncToOSThread ( WebSecurityContext webSecurityContext ) throws SecurityViolationException { try { Object token = ThreadIdentityManager . setAppThreadIdentity ( subjectManager . getInvocationSubject ( ) ) ; webSecurityContext . setSyncToOSThreadToken ( token ) ; } catch ( ThreadIdentityException tie ) { SecurityViolationException secVE = convertWebSecurityException ( new WebSecurityCollaboratorException ( tie . getMessage ( ) , DENY_AUTHZ_FAILED , webSecurityContext ) ) ; throw secVE ; } }
Sync the invocation Subject s identity to the thread if request by the application .