Search in sources :

Example 1 with TokenCanceller

use of org.apache.cxf.sts.token.canceller.TokenCanceller in project OpenAM by OpenRock.

the class TokenCancelOperationProvider method getFunctionalCancelOperation.

private CancelOperation getFunctionalCancelOperation() {
    TokenCancelOperation tokenCancelOperation = new TokenCancelOperation();
    tokenCancelOperation.setStsProperties(stsPropertiesMBean);
    tokenCancelOperation.setTokenStore(tokenStore);
    try {
        List<TokenCanceller> tokenCancellers = new ArrayList<>();
        for (TokenType tokentype : validatedTokens) {
            tokenCancellers.add(operationFactory.getTokenCanceller(tokentype));
        }
        tokenCancelOperation.setTokenCancellers(tokenCancellers);
    } catch (STSInitializationException e) {
        throw new RuntimeException(e);
    }
    return new TokenCancelOperationWrapper(tokenCancelOperation, threadLocalAMTokenCache);
}
Also used : TokenType(org.forgerock.openam.sts.TokenType) RequestSecurityTokenType(org.apache.cxf.ws.security.sts.provider.model.RequestSecurityTokenType) ArrayList(java.util.ArrayList) TokenCancelOperation(org.apache.cxf.sts.operation.TokenCancelOperation) STSInitializationException(org.forgerock.openam.sts.STSInitializationException) TokenCanceller(org.apache.cxf.sts.token.canceller.TokenCanceller)

Aggregations

ArrayList (java.util.ArrayList)1 TokenCancelOperation (org.apache.cxf.sts.operation.TokenCancelOperation)1 TokenCanceller (org.apache.cxf.sts.token.canceller.TokenCanceller)1 RequestSecurityTokenType (org.apache.cxf.ws.security.sts.provider.model.RequestSecurityTokenType)1 STSInitializationException (org.forgerock.openam.sts.STSInitializationException)1 TokenType (org.forgerock.openam.sts.TokenType)1