Examples of InvalidScopeException


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

  }

  @Test
  public void readValueInvalidScope() throws Exception {
    String accessToken = createResponse(OAuth2Exception.INVALID_SCOPE);
    InvalidScopeException result = (InvalidScopeException) mapper.readValue(accessToken, OAuth2Exception.class);
    assertEquals(DETAILS,result.getMessage());
    assertEquals(null,result.getAdditionalInformation());
  }
View Full Code Here

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

    assertEquals(expected,mapper.writeValueAsString(oauthException));
  }

  @Test
  public void writeValueAsStringInvalidScope() throws Exception {
    oauthException = new InvalidScopeException(DETAILS);
    String expected = createResponse(oauthException.getOAuth2ErrorCode());
    assertEquals(expected,mapper.writeValueAsString(oauthException));
  }
View Full Code Here

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

  }

  @Test
  public void readValueInvalidScope() throws Exception {
    String accessToken = createResponse(OAuth2Exception.INVALID_SCOPE);
    InvalidScopeException result = (InvalidScopeException) mapper.readValue(accessToken, OAuth2Exception.class);
    assertEquals(DETAILS,result.getMessage());
    assertEquals(null,result.getAdditionalInformation());
  }
View Full Code Here

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

      }
    });
    endpoint.setAuthorizationCodeServices(new StubAuthorizationCodeServices() {
      @Override
      public String createAuthorizationCode(OAuth2Authentication authentication) {
        throw new InvalidScopeException("FOO");
      }
    });
    ModelAndView result = endpoint.authorize(
        model,
        getAuthorizationRequest("foo", "http://anywhere.com", "mystate", "myscope",
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.