Package org.springframework.security.authentication

Examples of org.springframework.security.authentication.AuthenticationServiceException


      }

      return uriBuilder.build().toString();

    } catch (URISyntaxException e) {
      throw new AuthenticationServiceException("Malformed Authorization Endpoint Uri", e);

    }


View Full Code Here


  @Override
  public RegisteredClient getClientConfiguration(ServerConfiguration issuer) {
    try {
      if (!whitelist.isEmpty() && !whitelist.contains(issuer)) {
        throw new AuthenticationServiceException("Whitelist was nonempty, issuer was not in whitelist: " + issuer);
      }

      if (blacklist.contains(issuer)) {
        throw new AuthenticationServiceException("Issuer was in blacklist: " + issuer);
      }

      return clients.get(issuer);
    } catch (UncheckedExecutionException ue) {
      logger.warn("Unable to get client configuration", ue);
View Full Code Here

      uriBuilder.addParameter("request", jwt.serialize());

      // build out the URI
      return uriBuilder.build().toString();
    } catch (URISyntaxException e) {
      throw new AuthenticationServiceException("Malformed Authorization Endpoint Uri", e);
    }
  }
View Full Code Here

      uriBuilder.addParameter("request", jwt.serialize());

      // build out the URI
      return uriBuilder.build().toString();
    } catch (URISyntaxException e) {
      throw new AuthenticationServiceException("Malformed Authorization Endpoint Uri", e);
    }
  }
View Full Code Here

        try {
            loadedUser = this.getUserDetailsService().loadUserByUsername(username);
        }
        catch (DataAccessException repositoryProblem) {
            throw new AuthenticationServiceException(repositoryProblem.getMessage(), repositoryProblem);
        }

        if (loadedUser == null) {
            throw new AuthenticationServiceException(
                    "UserDetailsService returned null, which is an interface contract violation");
        }
        return loadedUser;
  }
View Full Code Here

                    }
                  }

                  String id = user.create();
                  if (id == null) {
                    throw new AuthenticationServiceException("Authentication failed: cannot create new user.");
                  }
                }
                userAuth = new UserAuthentication(user);
              }
              EntityUtils.consumeQuietly(resp2.getEntity());
View Full Code Here

                    }
                  }

                  String id = user.create();
                  if (id == null) {
                    throw new AuthenticationServiceException("Authentication failed: cannot create new user.");
                  }
                }
                userAuth = new UserAuthentication(user);
              }
              EntityUtils.consumeQuietly(resp2.getEntity());
View Full Code Here

                    }
                  }

                  String id = user.create();
                  if (id == null) {
                    throw new AuthenticationServiceException("Authentication failed: cannot create new user.");
                  }
                }
                userAuth = new UserAuthentication(user);
              }
              EntityUtils.consumeQuietly(resp2.getEntity());
View Full Code Here

    String salt = null;
    if(userDetails instanceof CartUserDetails){
      CartUserDetails cartUserDetails = (CartUserDetails)userDetails;
      salt = cartUserDetails.getSalt();
    }else{
      throw new AuthenticationServiceException("UserDetails cannot be casted to CartUserDetails");
    }
   
    String encPass = Password.encode(salt.toString(), presentedPasswd);
   
    if(!StringUtils.equals(userDetails.getPassword(), encPass)){
View Full Code Here

          log.debug("Redirecting to " + openIdUrl);
        }
        throw new SocialAuthenticationRedirectException(openIdUrl);
      } catch (OpenIDConsumerException e) {
        log.debug("Failed to consume claimedIdentity: " + claimedIdentity, e);
        throw new AuthenticationServiceException("Unable to process claimed identity '" + claimedIdentity + "'");
      }
    }

    if (log.isDebugEnabled()) {
      log.debug("Supplied OpenID identity is " + identity);
    }

    try {
      OpenIDAuthenticationToken token = consumer.endConsumption(request);

      String verifiedId = (String) token.getPrincipal();
      ConnectionData data = new ConnectionData(connectionFactory.getProviderId(), verifiedId, null, null, null,
          null, null, null, null);

      return new SocialAuthenticationToken(connectionFactory.createConnection(data), obtainAccountData(token));
    } catch (OpenIDConsumerException oice) {
      throw new AuthenticationServiceException("Consumer error", oice);
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.security.authentication.AuthenticationServiceException

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.