Search in sources :

Example 1 with RealmProperties

use of org.apache.cxf.sts.token.realm.RealmProperties in project cas by apereo.

the class CoreWsSecuritySecurityTokenServiceConfiguration method casRealm.

@RefreshScope
@Bean
public RealmProperties casRealm() {
    final WsFederationProperties.SecurityTokenService wsfed = casProperties.getAuthn().getWsfedIdP().getSts();
    final WsFederationProperties.IdentityProvider idp = casProperties.getAuthn().getWsfedIdP().getIdp();
    final RealmProperties realm = new RealmProperties();
    realm.setIssuer(wsfed.getRealm().getIssuer());
    final Properties p = CryptoUtils.getSecurityProperties(wsfed.getRealm().getKeystoreFile(), wsfed.getRealm().getKeystorePassword(), wsfed.getRealm().getKeystoreAlias());
    realm.setSignatureCryptoProperties(p);
    realm.setCallbackHandler(new RealmPasswordVerificationCallbackHandler(wsfed.getRealm().getKeyPassword()));
    return realm;
}
Also used : WsFederationProperties(org.apereo.cas.configuration.model.support.wsfed.WsFederationProperties) RealmPasswordVerificationCallbackHandler(org.apereo.cas.support.realm.RealmPasswordVerificationCallbackHandler) CasConfigurationProperties(org.apereo.cas.configuration.CasConfigurationProperties) WsFederationProperties(org.apereo.cas.configuration.model.support.wsfed.WsFederationProperties) EnableConfigurationProperties(org.springframework.boot.context.properties.EnableConfigurationProperties) RealmProperties(org.apache.cxf.sts.token.realm.RealmProperties) StaticSTSProperties(org.apache.cxf.sts.StaticSTSProperties) Properties(java.util.Properties) RealmProperties(org.apache.cxf.sts.token.realm.RealmProperties) 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

Properties (java.util.Properties)1 STSPropertiesMBean (org.apache.cxf.sts.STSPropertiesMBean)1 StaticSTSProperties (org.apache.cxf.sts.StaticSTSProperties)1 RealmProperties (org.apache.cxf.sts.token.realm.RealmProperties)1 CasConfigurationProperties (org.apereo.cas.configuration.CasConfigurationProperties)1 WsFederationProperties (org.apereo.cas.configuration.model.support.wsfed.WsFederationProperties)1 RealmPasswordVerificationCallbackHandler (org.apereo.cas.support.realm.RealmPasswordVerificationCallbackHandler)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 EnableConfigurationProperties (org.springframework.boot.context.properties.EnableConfigurationProperties)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