Package com.adito.security

Examples of com.adito.security.AuthenticationScheme


     */
    private AuthenticationScheme buildAuthenticationSchemeSequence(ResultSet resultSet) throws Exception {
        Calendar created = JDBCUtil.getCalendar(resultSet, "date_created");
        Calendar amended = JDBCUtil.getCalendar(resultSet, "date_amended");
        boolean enabled = resultSet.getInt("enabled") == 1;
        AuthenticationScheme seq = new DefaultAuthenticationScheme(resultSet.getInt("realm_id"), resultSet.getInt("resource_id"),
                        resultSet.getString("resource_name"), resultSet.getString("resource_description"), created, amended,
                        enabled, resultSet.getInt("priority"));
        return isSchemeAvailable(seq) ? seq : null;
    }
View Full Code Here


            ps.setInt(1, realmID);
            ResultSet rs = ps.executeQuery();
            try {
                List<AuthenticationScheme> sequences = new ArrayList<AuthenticationScheme>();
                while (rs.next()) {
                    AuthenticationScheme sequence = buildAuthenticationSchemeSequence(rs);
                    if (sequence != null) {
                        sequences.add(sequence);
                    }
                }
                return sequences;
View Full Code Here

    public static boolean canLogin(Principal principal) throws Exception {
        PolicyDatabase policyDatabase = PolicyDatabaseFactory.getInstance();
        List<Integer> grantedResourcesOfType = policyDatabase.getGrantedResourcesOfType(principal,
            PolicyConstants.AUTHENTICATION_SCHEMES_RESOURCE_TYPE);
        for (Integer schemeId : grantedResourcesOfType) {
            AuthenticationScheme scheme = SystemDatabaseFactory.getInstance().getAuthenticationSchemeSequence(schemeId);
            if (scheme != null && !scheme.isSystemScheme() && scheme.getEnabled()) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

        List<WizardActionStatus> actionStatus = new ArrayList<WizardActionStatus>();
        AbstractWizardSequence seq = getWizardSequence(request);
        String name = (String) seq.getAttribute(AthenticationSchemeDetailsForm.ATTR_RESOURCE_NAME, null);
        String description = (String) seq.getAttribute(AthenticationSchemeDetailsForm.ATTR_RESOURCE_DESCRIPTION, null);
        PropertyList selectedModules = ((PropertyList) seq.getAttribute(AthenticationSchemeSelectionForm.ATTR_SELECTED_MODULES, new PropertyList()));
        AuthenticationScheme defaultAuthenticationScheme = null;
        try {
            try {
                int priority = AuthenticationSchemeResourceType.getAuthenticationSchemePriority(getSessionInfo(request));
                defaultAuthenticationScheme = SystemDatabaseFactory.getInstance().createAuthenticationSchemeSequence(
                                getSessionInfo(request).getUser().getRealm().getRealmID(), name, description,
View Full Code Here

TOP

Related Classes of com.adito.security.AuthenticationScheme

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.