Examples of GuardedString


Examples of org.identityconnectors.common.security.GuardedString

    private static void initRemote(final URI location) {
        // 1. Extract conf params for remote connection from given URI
        final String host = location.getHost();
        final int port = location.getPort();
        final GuardedString key = new GuardedString(location.getUserInfo().toCharArray());
        final boolean useSSL = location.getScheme().equals("connids");

        final List<TrustManager> trustManagers = new ArrayList<TrustManager>();
        final String[] params = StringUtils.isBlank(location.getQuery()) ? null : location.getQuery().split("&");
        if (params != null && params.length > 0) {
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);

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

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

            try {
                final Class propertySchemaClass = ClassUtils.forName(property.getSchema().getType(), 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()
                            ? values.get(0).toString().charAt(0)
View Full Code Here

Examples of org.identityconnectors.common.security.GuardedString

    private static void initRemote(final URI location) {
        // 1. Extract conf params for remote connection from given URI
        final String host = location.getHost();
        final int port = location.getPort();
        final GuardedString key = new GuardedString(location.getUserInfo().toCharArray());
        final boolean useSSL = location.getScheme().equals("connids");

        final List<TrustManager> trustManagers = new ArrayList<TrustManager>();
        final String[] params = StringUtils.isBlank(location.getQuery()) ? null : location.getQuery().split("&");
        if (params != null && params.length > 0) {
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

            try {
                final Class propertySchemaClass = ClassUtils.forName(property.getSchema().getType(), 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()
                            ? values.get(0).toString().charAt(0)
View Full Code Here

Examples of org.identityconnectors.common.security.GuardedString

            try {
                final Class propertySchemaClass = ClassUtils.forName(property.getSchema().getType(), 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()
                            ? values.get(0).toString().charAt(0)
View Full Code Here

Examples of org.identityconnectors.common.security.GuardedString

            base64SHA1Hash = tree.get("base64SHA1Hash").asText();
        }

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

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

        try {
            Field field = GuardedString.class.getDeclaredField("readOnly");
            field.setAccessible(true);
            field.setBoolean(dest, readOnly);
View Full Code Here

Examples of org.identityconnectors.common.security.GuardedString

    private void initRemote(final URI location) {
        // 1. Extract conf params for remote connection from given URI
        final String host = location.getHost();
        final int port = location.getPort();
        final GuardedString key = new GuardedString(location.getUserInfo().toCharArray());
        final boolean useSSL = location.getScheme().equals("connids");

        final List<TrustManager> trustManagers = new ArrayList<TrustManager>();
        final String[] params = StringUtils.isBlank(location.getQuery()) ? null : location.getQuery().split("&");
        if (params != null && params.length > 0) {
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.