Search in sources :

Example 1 with TokenValidateOperation

use of org.apache.cxf.sts.operation.TokenValidateOperation in project OpenAM by OpenRock.

the class TokenValidateOperationProvider method getFunctionalValidateOperation.

private ValidateOperation getFunctionalValidateOperation() {
    TokenValidateOperation tokenValidateOperation = new TokenValidateOperation();
    tokenValidateOperation.setStsProperties(stsPropertiesMBean);
    tokenValidateOperation.setTokenStore(tokenStore);
    try {
        List<TokenValidator> tokenValidators = new ArrayList<>();
        for (TokenType tokentype : validatedTokens) {
            tokenValidators.add(operationFactory.getSimpleTokenValidator(tokentype));
        }
        tokenValidateOperation.setTokenValidators(tokenValidators);
    } catch (STSInitializationException e) {
        throw new RuntimeException(e);
    }
    return new TokenValidateOperationWrapper(tokenValidateOperation, threadLocalAMTokenCache);
}
Also used : TokenValidator(org.apache.cxf.sts.token.validator.TokenValidator) TokenType(org.forgerock.openam.sts.TokenType) RequestSecurityTokenType(org.apache.cxf.ws.security.sts.provider.model.RequestSecurityTokenType) ArrayList(java.util.ArrayList) TokenValidateOperation(org.apache.cxf.sts.operation.TokenValidateOperation) STSInitializationException(org.forgerock.openam.sts.STSInitializationException)

Example 2 with TokenValidateOperation

use of org.apache.cxf.sts.operation.TokenValidateOperation in project cas by apereo.

the class CoreWsSecuritySecurityTokenServiceConfiguration method transportValidateDelegate.

@RefreshScope
@Bean
public ValidateOperation transportValidateDelegate() {
    final TokenValidateOperation op = new TokenValidateOperation();
    op.setTokenValidators(transportTokenValidators());
    op.setStsProperties(transportSTSProperties());
    op.setEventListener(loggerListener());
    return op;
}
Also used : TokenValidateOperation(org.apache.cxf.sts.operation.TokenValidateOperation) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) STSPropertiesMBean(org.apache.cxf.sts.STSPropertiesMBean) ServletRegistrationBean(org.springframework.boot.web.servlet.ServletRegistrationBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

TokenValidateOperation (org.apache.cxf.sts.operation.TokenValidateOperation)2 ArrayList (java.util.ArrayList)1 STSPropertiesMBean (org.apache.cxf.sts.STSPropertiesMBean)1 TokenValidator (org.apache.cxf.sts.token.validator.TokenValidator)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 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 ServletRegistrationBean (org.springframework.boot.web.servlet.ServletRegistrationBean)1 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)1 Bean (org.springframework.context.annotation.Bean)1