use of org.picketlink.config.federation.TokenProviderType in project wildfly by wildfly.
the class EntityProviderService method configureTokenProviders.
/**
* <p> Configure the STS Token Providers. </p>
*/
private void configureTokenProviders() {
STSType stsType = getFederationService().getValue().getStsType();
if (stsType != null) {
int tokenTimeout = stsType.getTokenTimeout();
int clockSkew = stsType.getClockSkew();
STSType providerStsType = getPicketLinkType().getStsType();
providerStsType.setTokenTimeout(tokenTimeout);
providerStsType.setClockSkew(clockSkew);
List<TokenProviderType> tokenProviders = providerStsType.getTokenProviders().getTokenProvider();
for (TokenProviderType tokenProviderType : tokenProviders) {
if (tokenProviderType.getTokenType().equals(JBossSAMLURIConstants.ASSERTION_NSURI.get())) {
KeyValueType keyValueTypeTokenTimeout = new KeyValueType();
keyValueTypeTokenTimeout.setKey(GeneralConstants.ASSERTIONS_VALIDITY);
keyValueTypeTokenTimeout.setValue(String.valueOf(tokenTimeout));
KeyValueType keyValueTypeClockSkew = new KeyValueType();
keyValueTypeClockSkew.setKey(GeneralConstants.CLOCK_SKEW);
keyValueTypeClockSkew.setValue(String.valueOf(clockSkew));
tokenProviderType.add(keyValueTypeTokenTimeout);
tokenProviderType.add(keyValueTypeClockSkew);
}
}
}
}
Aggregations