Package org.opensaml.xml.security.credential

Examples of org.opensaml.xml.security.credential.Credential


    protected void populateVelocityContext(VelocityContext velocityContext, SAMLMessageContext messageContext,
            String endpointURL) throws MessageEncodingException {

        super.populateVelocityContext(velocityContext, messageContext, endpointURL);

        Credential signingCredential = messageContext.getOuboundSAMLMessageSigningCredential();
        if (signingCredential == null) {
            log.debug("No signing credential was supplied, skipping HTTP-Post simple signing");
            return;
        }
View Full Code Here


        SAMLObject outboundMessage = messageContext.getOutboundSAMLMessage();
        if (outboundMessage instanceof SignableSAMLObject
                && messageContext.getOuboundSAMLMessageSigningCredential() != null) {
            log.debug("Signing outbound SAML message.");
            SignableSAMLObject signableMessage = (SignableSAMLObject) outboundMessage;
            Credential signingCredential = messageContext.getOuboundSAMLMessageSigningCredential();

            XMLObjectBuilder<Signature> signatureBuilder = Configuration.getBuilderFactory().getBuilder(
                    Signature.DEFAULT_ELEMENT_NAME);
            Signature signature = signatureBuilder.buildObject(Signature.DEFAULT_ELEMENT_NAME);
            signature.setSigningCredential(signingCredential);
View Full Code Here

        String alias = (String) parser.getOptionValue(CLIParserBuilder.ALIAS_ARG);
        String keyPass = (String) parser.getOptionValue(CLIParserBuilder.KEY_PASS_ARG);
        Boolean sign = (Boolean) parser.getOptionValue(CLIParserBuilder.SIGN_ARG);
        if (sign != null && sign.booleanValue()) {
            KeyStore keystore = getKeyStore(keystorePath, storeType, storePass);
            Credential signingCredential = getSigningCredential(keystore, alias, keyPass);
            sign(metadata, signingCredential);
        } else {
            if (keystorePath != null) {
                KeyStore keystore = getKeyStore(keystorePath, storeType, storePass);
                Credential verificationCredential = getVerificationCredential(keystore, alias);
                verifySignature(metadata, verificationCredential);
            }
        }

        String outputFile = (String) parser.getOptionValue(CLIParserBuilder.OUTPUT_FILE_ARG);
View Full Code Here

     * @param samlContext context to populate decryptor for.
     */
    protected void populateDecrypter(SAMLMessageContext samlContext) {

        // Locate encryption key for this entity
        Credential encryptionCredential;
        if (samlContext.getLocalExtendedMetadata().getEncryptionKey() != null) {
            encryptionCredential = keyManager.getCredential(samlContext.getLocalExtendedMetadata().getEncryptionKey());
        } else {
            encryptionCredential = keyManager.getDefaultCredential();
        }
View Full Code Here

TOP

Related Classes of org.opensaml.xml.security.credential.Credential

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.