Examples of UnauthorizedUserException


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

    assertEquals(expected, getOutput());
  }

  @Test
  public void writeUnauthorizedClient() throws Exception {
    OAuth2Exception oauthException = new UnauthorizedUserException(DETAILS);
    String expected = createResponse(oauthException.getOAuth2ErrorCode());
    converter.write(oauthException, contentType, outputMessage);
    assertEquals(expected, getOutput());
  }
View Full Code Here

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

  @Test
  public void readUnauthorizedClient() throws Exception {
    String accessToken = createResponse(OAuth2Exception.UNAUTHORIZED_CLIENT);
    when(inputMessage.getBody()).thenReturn(createInputStream(accessToken));
    @SuppressWarnings("unused")
    UnauthorizedUserException result = (UnauthorizedUserException) converter.read(OAuth2Exception.class,
        inputMessage);
  }
View Full Code Here

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

  }

  @Test
  public void readValueUnauthorizedClient() throws Exception {
    String accessToken = createResponse(OAuth2Exception.UNAUTHORIZED_CLIENT);
    UnauthorizedUserException result = (UnauthorizedUserException) 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.UnauthorizedUserException

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

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

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

  }

  @Test
  public void readValueUnauthorizedClient() throws Exception {
    String accessToken = createResponse(OAuth2Exception.UNAUTHORIZED_CLIENT);
    UnauthorizedUserException result = (UnauthorizedUserException) mapper.readValue(accessToken,
        OAuth2Exception.class);
    assertEquals(DETAILS,result.getMessage());
    assertEquals(null,result.getAdditionalInformation());
  }
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.