security/api/src/main/java/org/jboss/as/security/api/ConnectionSecurityContext.java
public static void popIdentity(final ContextStateCache stateCache) {
        RemotingContext.setConnection(stateCache.getConnection());
        SecurityContextAssociation.setSecurityContext(stateCache.getSecurityContext());
    }
public static void popIdentity(final ContextStateCache stateCache) {
        RemotingContext.setConnection(stateCache.getConnection());
        SecurityContextAssociation.setSecurityContext(stateCache.getSecurityContext());
    }
Pop the identity previously associated and restore internal state to it's previous value.

@param stateCache - The cache containing the state as it was when pushIdentity was called.