Examples of GuardedString


Examples of org.identityconnectors.common.security.GuardedString

                if (missing != null && missing.getValue() != null && missing.getValue().size() == 1
                        && missing.getValue().get(0).equals(OperationalAttributes.PASSWORD_NAME)
                        && cipherAlgorithmMatches(getCipherAlgorithm(connInstance), user.getCipherAlgorithm())) {

                    Attribute passwordAttribute = AttributeBuilder.buildPassword(
                            new GuardedString(user.getPassword().toCharArray()));

                    Set<Attribute> attributes = new HashSet<Attribute>(task.getAttributes());
                    attributes.add(passwordAttribute);
                    attributes.remove(missing);
View Full Code Here

Examples of org.identityconnectors.common.security.GuardedString

    public Uid authenticate(final String username, final String password, final OperationOptions options) {
        Uid result = null;

        if (activeConnInstance.getCapabilities().contains(ConnectorCapability.AUTHENTICATE)) {
            final Future<Uid> future = asyncFacade.authenticate(
                    connector, username, new GuardedString(password.toCharArray()), options);
            try {
                result = future.get(activeConnInstance.getConnRequestTimeout(), TimeUnit.SECONDS);
            } catch (java.util.concurrent.TimeoutException e) {
                future.cancel(true);
                throw new TimeoutException("Request timeout");
View Full Code Here

Examples of org.identityconnectors.common.security.GuardedString

        try {
            final Class<?> propertySchemaClass = ClassUtils.forName(propType, ClassUtils.getDefaultClassLoader());

            if (GuardedString.class.equals(propertySchemaClass)) {
                value = new GuardedString(values.get(0).toString().toCharArray());
            } else if (GuardedByteArray.class.equals(propertySchemaClass)) {
                value = new GuardedByteArray((byte[]) values.get(0));
            } else if (Character.class.equals(propertySchemaClass) || Character.TYPE.equals(propertySchemaClass)) {
                value = values.get(0) == null || values.get(0).toString().isEmpty()
                        ? null : values.get(0).toString().charAt(0);
View Full Code Here

Examples of org.identityconnectors.common.security.GuardedString

                    String cipherPlusPassword =
                            ("{" + cipherAlgorithm.toLowerCase() + "}" + new String(base64EncodedPassword));

                    Attribute passwordAttribute = AttributeBuilder.buildPassword(
                            new GuardedString(cipherPlusPassword.toCharArray()));

                    Set<Attribute> attributes = new HashSet<Attribute>(task.getAttributes());
                    attributes.add(passwordAttribute);
                    attributes.remove(missing);
View Full Code Here

Examples of org.identityconnectors.common.security.GuardedString

        final byte[] encryptedBytes = Base64.decode(reader.getValue());
        reader.moveUp();

        final byte[] clearBytes = EncryptorFactory.getInstance().getDefaultEncryptor().decrypt(encryptedBytes);

        final GuardedString dest = new GuardedString(new String(clearBytes).toCharArray());

        try {
            final Field readOnlyField = GuardedString.class.getDeclaredField("readOnly");
            readOnlyField.setAccessible(true);
            readOnlyField.setBoolean(dest, readOnly);
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.