Examples of BasicCredential


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

     * @throws NoSuchProviderException provider not found
     */
    public static Credential generateKeyAndCredential(String algorithmURI)
            throws NoSuchAlgorithmException, NoSuchProviderException {
        SecretKey key = generateKeyFromURI(algorithmURI);
        BasicCredential credential = new BasicCredential();
        credential.setSecretKey(key);
        return credential;
    }
View Full Code Here

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

     * @throws NoSuchProviderException provider not found
     */
    public static Credential generateKeyPairAndCredential(String algorithmURI, int keyLength, boolean includePrivate)
            throws NoSuchAlgorithmException, NoSuchProviderException {
        KeyPair keyPair = generateKeyPairFromURI(algorithmURI, keyLength);
        BasicCredential credential = new BasicCredential();
        credential.setPublicKey(keyPair.getPublic());
        if (includePrivate) {
            credential.setPrivateKey(keyPair.getPrivate());
        }
        return credential;
    }
View Full Code Here

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

                        if(credentials == null){
                            continue;
                        }
                        for (Credential cred : creds) {
                            if (cred instanceof BasicCredential) {
                                BasicCredential basicCred = (BasicCredential) cred;
                                basicCred.setEntityId(entityID);
                                basicCred.setUsageType(mdUsage);
                                basicCred.getCredentalContextSet().add(new SAMLMDCredentialContext(keyDescriptor));
                            }
                            credentials.add(cred);
                        }
                    }
                }
View Full Code Here

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

            logger.debug("Loading credential data from keystore");

            switch (credentialType) {
                case BASIC_CREDENTIAL:
                    BasicCredential basicCredential = new BasicCredential();
                    basicCredential.setPrivateKey((PrivateKey) keystore.getKey(keystoreAlias, keystoreAliasPassword));
                    basicCredential.setPublicKey(keystore.getCertificate(keystoreAlias).getPublicKey());

                    credential = basicCredential;
                    break;

                case X509_CREDENTIAL:
View Full Code Here

Examples of org.owasp.webscarab.plugin.BasicCredential

        String realm = realmTextArea.getText();
        String username = usernameTextField.getText();
        String password = new String(passwordTextField.getPassword());
        if (!(username.equals("") || password.equals(""))) {
            if (basicRadioButton.isSelected()) {
                BasicCredential bc = new BasicCredential(host, realm, username, password);
                _manager.addBasicCredentials(bc);
            } else if (domainRadioButton.isSelected()) {
                DomainCredential dc = new DomainCredential(host, domain, username, password);
                _manager.addDomainCredentials(dc);
            }
View Full Code Here

Examples of org.owasp.webscarab.plugin.BasicCredential

        public int getRowCount() {
            return _manager.getBasicCredentialCount();
        }

        public Object getValueAt(int row, int column) {
            BasicCredential bc = _manager.getBasicCredentialAt(row);
            switch (column) {
                case 0: return bc.getHost();
                case 1: return bc.getRealm();
                case 2: return bc.getUsername();
            }
            return null;
        }
View Full Code Here
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.