Search in sources :

Example 1 with WrappingSecurityTokenServiceClaimsHandler

use of org.apereo.cas.support.claims.WrappingSecurityTokenServiceClaimsHandler in project cas by apereo.

the class CoreWsSecuritySecurityTokenServiceConfiguration method transportIssueDelegate.

@RefreshScope
@Bean
public IssueOperation transportIssueDelegate() {
    final WsFederationProperties.SecurityTokenService wsfed = casProperties.getAuthn().getWsfedIdP().getSts();
    final WsFederationProperties.IdentityProvider idp = casProperties.getAuthn().getWsfedIdP().getIdp();
    final ClaimsManager claimsManager = new ClaimsManager();
    claimsManager.setClaimHandlers(Arrays.asList(new WrappingSecurityTokenServiceClaimsHandler(idp.getRealmName(), wsfed.getRealm().getIssuer())));
    final TokenIssueOperation op = new TokenIssueOperation();
    op.setTokenProviders(transportTokenProviders());
    op.setServices(Arrays.asList(transportService()));
    op.setStsProperties(transportSTSProperties());
    op.setClaimsManager(claimsManager);
    op.setTokenValidators(transportTokenValidators());
    op.setEventListener(loggerListener());
    op.setDelegationHandlers(delegationHandlers());
    op.setEncryptIssuedToken(wsfed.isEncryptTokens());
    return op;
}
Also used : WsFederationProperties(org.apereo.cas.configuration.model.support.wsfed.WsFederationProperties) WrappingSecurityTokenServiceClaimsHandler(org.apereo.cas.support.claims.WrappingSecurityTokenServiceClaimsHandler) TokenIssueOperation(org.apache.cxf.sts.operation.TokenIssueOperation) ClaimsManager(org.apache.cxf.sts.claims.ClaimsManager) 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

STSPropertiesMBean (org.apache.cxf.sts.STSPropertiesMBean)1 ClaimsManager (org.apache.cxf.sts.claims.ClaimsManager)1 TokenIssueOperation (org.apache.cxf.sts.operation.TokenIssueOperation)1 WsFederationProperties (org.apereo.cas.configuration.model.support.wsfed.WsFederationProperties)1 WrappingSecurityTokenServiceClaimsHandler (org.apereo.cas.support.claims.WrappingSecurityTokenServiceClaimsHandler)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