Examples of UnsupportedResponseTypeException


Examples of org.springframework.security.oauth2.common.exceptions.UnsupportedResponseTypeException

    AuthorizationRequest authorizationRequest = getOAuth2RequestFactory().createAuthorizationRequest(parameters);

    Set<String> responseTypes = authorizationRequest.getResponseTypes();

    if (!responseTypes.contains("token") && !responseTypes.contains("code")) {
      throw new UnsupportedResponseTypeException("Unsupported response types: " + responseTypes);
    }

    if (authorizationRequest.getClientId() == null) {
      throw new InvalidClientException("A client id must be provided");
    }
View Full Code Here

Examples of org.springframework.security.oauth2.common.exceptions.UnsupportedResponseTypeException

    try {
      TokenRequest tokenRequest = getOAuth2RequestFactory().createTokenRequest(authorizationRequest, "implicit");
      OAuth2Request storedOAuth2Request = getOAuth2RequestFactory().createOAuth2Request(authorizationRequest);
      OAuth2AccessToken accessToken = getAccessTokenForImplicitGrant(tokenRequest, storedOAuth2Request);
      if (accessToken == null) {
        throw new UnsupportedResponseTypeException("Unsupported response type: token");
      }
      return new ModelAndView(new RedirectView(appendAccessToken(authorizationRequest, accessToken), false, true,
          false));
    }
    catch (OAuth2Exception e) {
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.