use of org.picketlink.config.federation.KeyValueType in project wildfly by wildfly.
the class HandlerParameterAddHandler method toHandlerParameterConfig.
public static KeyValueType toHandlerParameterConfig(OperationContext context, String paramName, ModelNode parameterNode) throws OperationFailedException {
String paramValue = HandlerParameterResourceDefinition.VALUE.resolveModelAttribute(context, parameterNode).asString();
KeyValueType kv = new KeyValueType();
kv.setKey(paramName);
kv.setValue(paramValue);
return kv;
}
use of org.picketlink.config.federation.KeyValueType in project wildfly by wildfly.
the class HandlerParameterAddHandler method performRuntime.
@Override
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException {
PathAddress pathAddress = PathAddress.pathAddress(operation.get(ADDRESS));
String providerAlias = pathAddress.subAddress(0, pathAddress.size() - 2).getLastElement().getValue();
String handlerType = pathAddress.subAddress(0, pathAddress.size() - 1).getLastElement().getValue();
EntityProviderService providerService = EntityProviderService.getService(context, providerAlias);
String handlerParameterName = pathAddress.getLastElement().getValue();
KeyValueType keyValueType = toHandlerParameterConfig(context, handlerParameterName, model);
providerService.addHandlerParameter(handlerType, keyValueType);
}
use of org.picketlink.config.federation.KeyValueType 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);
}
}
}
}
use of org.picketlink.config.federation.KeyValueType in project wildfly by wildfly.
the class KeyStoreProviderService method addKey.
public void addKey(String key, String validatingHost) {
removeKey(key);
String[] hosts = validatingHost.split(",");
for (String host : hosts) {
KeyValueType kv = new KeyValueType();
kv.setKey(host.trim());
kv.setValue(key.trim());
this.keyProviderType.add(kv);
}
}
use of org.picketlink.config.federation.KeyValueType in project wildfly by wildfly.
the class KeyStoreProviderService method setKeyProviderType.
public void setKeyProviderType(KeyProviderType keyProviderType, String file, String relativeTo) {
if (keyProviderType != null) {
for (KeyValueType kv : this.keyProviderType.getValidatingAlias()) {
keyProviderType.add(kv);
}
}
this.filePath = file;
this.relativeTo = relativeTo;
this.keyProviderType = keyProviderType;
configureKeyStoreFilePath();
getFederationService().getValue().setKeyProviderType(this.keyProviderType);
}
Aggregations