use of org.apereo.cas.support.realm.UriRealmParser in project cas by apereo.
the class CoreWsSecuritySecurityTokenServiceConfiguration method transportSTSProperties.
@RefreshScope
@ConditionalOnMissingBean(name = "transportSTSProperties")
@Bean
public STSPropertiesMBean transportSTSProperties() {
final WsFederationProperties.SecurityTokenService wsfed = casProperties.getAuthn().getWsfedIdP().getSts();
final WsFederationProperties.IdentityProvider idp = casProperties.getAuthn().getWsfedIdP().getIdp();
final StaticSTSProperties s = new StaticSTSProperties();
s.setIssuer(getClass().getSimpleName());
s.setRealmParser(new UriRealmParser(realms()));
s.setSignatureCryptoProperties(CryptoUtils.getSecurityProperties(wsfed.getSigningKeystoreFile(), wsfed.getSigningKeystorePassword()));
s.setEncryptionCryptoProperties(CryptoUtils.getSecurityProperties(wsfed.getEncryptionKeystoreFile(), wsfed.getEncryptionKeystorePassword()));
final Relationship rel = new Relationship();
rel.setType(Relationship.FED_TYPE_IDENTITY);
rel.setSourceRealm(idp.getRealmName());
rel.setTargetRealm(idp.getRealmName());
s.setRelationships(Arrays.asList(rel));
return s;
}
Aggregations