Package axiom.saml.idp

Source Code of axiom.saml.idp.IdentityProvider

package axiom.saml.idp;

import org.apache.log4j.Logger;
import org.opensaml.common.SignableSAMLObject;

public class IdentityProvider {
    private static Logger logger = Logger.getLogger(IdentityProvider.class);

    private final IdpConfiguration config;

    public IdentityProvider(IdpConfiguration config) {
        logger.debug("Creating IdentityProvider based on IdpConfiguration");
        this.config = config;
    }

    public SignableSAMLObject generateSamlResponse() {
        logger.debug("Building unsigned SamlResponse");
        final SignableSAMLObject response = config.getResponseFactory().buildResponse();

        logger.debug("Signing and returning SamlResponse");
        return (SignableSAMLObject) config.getXmlObjectSigner().sign(response);
    }
}
TOP

Related Classes of axiom.saml.idp.IdentityProvider

TOP
Copyright © 2018 www.massapi.com. 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.