Examples of AuthenticationScheme


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

Examples of com.adito.security.AuthenticationScheme

            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

Examples of com.adito.security.AuthenticationScheme

    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

Examples of com.adito.security.AuthenticationScheme

        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

Examples of org.springframework.security.oauth2.common.AuthenticationScheme

public class DefaultClientAuthenticationHandler implements ClientAuthenticationHandler {

  public void authenticateTokenRequest(OAuth2ProtectedResourceDetails resource, MultiValueMap<String, String> form,
      HttpHeaders headers) {
    if (resource.isAuthenticationRequired()) {
      AuthenticationScheme scheme = AuthenticationScheme.header;
      if (resource.getClientAuthenticationScheme() != null) {
        scheme = resource.getClientAuthenticationScheme();
      }

      try {
View Full Code Here

Examples of org.springframework.security.oauth2.common.AuthenticationScheme

  @Override
  protected ClientHttpRequest createRequest(URI uri, HttpMethod method) throws IOException {

    OAuth2AccessToken accessToken = getAccessToken();

    AuthenticationScheme authenticationScheme = resource.getAuthenticationScheme();
    if (AuthenticationScheme.query.equals(authenticationScheme)
        || AuthenticationScheme.form.equals(authenticationScheme)) {
      uri = appendQueryParameter(uri, accessToken);
    }
View Full Code Here

Examples of org.springframework.security.oauth2.common.AuthenticationScheme

          .genericBeanDefinition(StringListFactoryBean.class);
      scopesBuilder.addConstructorArgValue(new TypedStringValue(scope));
      builder.addPropertyValue("scope", scopesBuilder.getBeanDefinition());
    }

    AuthenticationScheme btm = AuthenticationScheme.header;
    String bearerTokenMethod = element.getAttribute("authentication-scheme");
    if (StringUtils.hasText(bearerTokenMethod)) {
      btm = AuthenticationScheme.valueOf(bearerTokenMethod);
    }
    builder.addPropertyValue("authenticationScheme", btm);
View Full Code Here

Examples of org.uberfire.security.auth.AuthenticationScheme

            throws ServletException {

        final Map<String, String> options = buildOptions( filterConfig );

        final CookieStorage cookieStorage = getCookieStorage( options );
        final AuthenticationScheme basicAuthScheme = new HttpBasicAuthenticationScheme();
        final AuthenticationScheme rememberMeAuthScheme = getRememberMeAuthScheme( options, cookieStorage );
        final String forceURL = getForceURL( options );
        final AuthenticationScheme authScheme = getAuthenticationScheme( options );
        final AuthenticationManager authManager = getAuthenticationManager( options );
        final AuthenticationProvider authProvider = getAuthenticationProvider( options );
        final ResourceManager resourceManager = getResourceManager( options );
        final AuthorizationManager authzManager = getAuthorizationManager( options );
        final VotingStrategy urlVotingStrategy = getURLVotingStrategy( options );
View Full Code Here

Examples of org.uberfire.security.auth.AuthenticationScheme

        return loadConfigClazz( authManager, AuthenticationManager.class );
    }

    private AuthenticationScheme getAuthenticationScheme( final Map<String, String> options ) {
        final String authScheme = options.get( AUTH_SCHEME_KEY );
        AuthenticationScheme scheme = null;
        if ( authScheme == null || authScheme.isEmpty() ) {
            return new FormAuthenticationScheme();
        } else {
            scheme = loadConfigClazz( authScheme, AuthenticationScheme.class );
        }
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.