Package org.wildfly.extension.picketlink.federation.config

Examples of org.wildfly.extension.picketlink.federation.config.SPConfiguration


    @Override
    public SPType getSPConfiguration() {
        ProviderType providerType = this.getPicketLinkConfiguration().getIdpOrSP();

        if (providerType instanceof SPConfiguration) {
            SPConfiguration configuration = (SPConfiguration) providerType;

            if (configuration.isSupportMetadata()) {
                try {
                    SPType metadataConfig;

                    if (configuration.isPostBinding()) {
                        metadataConfig = new SPPostMetadataConfigurationProvider().getSPConfiguration();
                    } else {
                        metadataConfig = new SPRedirectMetadataConfigurationProvider().getSPConfiguration();
                    }

                    metadataConfig.importFrom(configuration);

                    providerType = metadataConfig;
                } catch (ProcessingException e) {
                    throw PicketLinkLogger.ROOT_LOGGER.federationSAMLMetadataConfigError(configuration.getAlias(), e);
                }
            }

            if (configParsedSPType != null) {
                configuration.importFrom(configParsedSPType);
            }

            return (SPType) providerType;
        }
View Full Code Here


        String federationAlias = pathAddress.subAddress(0, pathAddress.size() - 1).getLastElement().getValue();

        serviceBuilder.addDependency(FederationService.createServiceName(federationAlias),
            FederationService.class,service.getFederationService());

        SPConfiguration configuration = service.getConfiguration();

        serviceBuilder.addDependency(SecurityDomainService.SERVICE_NAME.append(configuration.getSecurityDomain()));

        if (verificationHandler != null) {
            serviceBuilder.addListener(verificationHandler);
        }
View Full Code Here

            newControllers.add(controller);
        }
    }

    private static SPConfiguration toSPConfig(OperationContext context, ModelNode fromModel, String alias) throws OperationFailedException {
        SPConfiguration spType = new SPConfiguration(alias);

        String url = ServiceProviderResourceDefinition.URL.resolveModelAttribute(context, fromModel).asString();

        spType.setServiceURL(url);

        String securityDomain = ServiceProviderResourceDefinition.SECURITY_DOMAIN.resolveModelAttribute(context, fromModel).asString();

        spType.setSecurityDomain(securityDomain);

        boolean postBinding = ServiceProviderResourceDefinition.POST_BINDING.resolveModelAttribute(context, fromModel).asBoolean();

        spType.setPostBinding(postBinding);

        boolean supportsSignatures = ServiceProviderResourceDefinition.SUPPORT_SIGNATURES.resolveModelAttribute(context, fromModel).asBoolean();

        spType.setSupportsSignature(supportsSignatures);

        boolean supportsMetadata = ServiceProviderResourceDefinition.SUPPORT_METADATA.resolveModelAttribute(context, fromModel).asBoolean();

        spType.setSupportMetadata(supportsMetadata);

        boolean strictPostBinding = ServiceProviderResourceDefinition.STRICT_POST_BINDING.resolveModelAttribute(context, fromModel).asBoolean();

        spType.setIdpUsesPostBinding(strictPostBinding);

        String errorPage = ServiceProviderResourceDefinition.ERROR_PAGE.resolveModelAttribute(context, fromModel).asString();

        spType.setErrorPage(errorPage);

        String logoutPage = ServiceProviderResourceDefinition.LOGOUT_PAGE.resolveModelAttribute(context, fromModel).asString();

        spType.setLogOutPage(logoutPage);

        return spType;
    }
View Full Code Here

TOP

Related Classes of org.wildfly.extension.picketlink.federation.config.SPConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.