Package com.sun.enterprise.security.auth.digest.api

Examples of com.sun.enterprise.security.auth.digest.api.Password


        return groups;
    }

    @Override
    public boolean validate(String username, DigestAlgorithmParameter[] params) {
        final Password pass = getPassword(username);
        if (pass == null) {
            return false;
        }
        return validate(pass, params);
    }
View Full Code Here


            rs = statement.executeQuery();

            if (rs.next()) {
                final String pwd = rs.getString(1);
                if (!PRE_HASHED.equalsIgnoreCase(getProperty(PARAM_ENCODING))) {
                    return new Password() {

                        public byte[] getValue() {
                            return pwd.getBytes();
                        }

                        public int getType() {
                            return Password.PLAIN_TEXT;
                        }
                    };
                } else {
                    return new Password() {

                        public byte[] getValue() {
                            return pwd.getBytes();
                        }
View Full Code Here

        try {
            pwdAdapter = masterPasswordHelper.getMasterPasswordAdapter();
            if ((pwdAdapter == null) && (passwd.getAlgorithm() != null)) {
                return false;
            }
            Password decPasswd = new Password() {

                public byte[] getValue() {
                    try {
                        if (passwd.getAlgorithm() != null) {
                            byte[] decPassVal = pwdAdapter.decrypt(passwd.getValue(), passwd.getAlgorithm());
View Full Code Here

        }
        return groups;
    }

    public boolean validate(String username, DigestAlgorithmParameter[] params) {
        final Password pass = getPassword(username);
        if (pass == null) {
            return false;
        }
        return validate(pass, params);
    }
View Full Code Here

            if (rs.next()) {
                Reader pwdReader = rs.getCharacterStream(1);
                final char[] pwd = extractFromReader(pwdReader);
                final byte[] pwdB = Utility.convertCharArrayToByteArray(pwd,null);
                if (getProperty(PARAM_DIGEST_PASSWORD_ENC_ALGORITHM) == null) {
                    return new Password() {

                        public byte[] getValue() {
                            return  pwdB;
                        }

                        public int getType() {
                            return Password.PLAIN_TEXT;
                        }

                        public String getAlgorithm() {
                            return null;
                        }
                    };
                } else {
                    return new Password() {

                        public byte[] getValue() {
                            if(getProperty(PARAM_ENCODING).equals(HEX)) {
                                return hexDecode(pwd);
                            }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.security.auth.digest.api.Password

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.