Example usage for org.springframework.security.oauth2.common.exceptions InsufficientScopeException getMessage

List of usage examples for org.springframework.security.oauth2.common.exceptions InsufficientScopeException getMessage

Introduction

In this page you can find the example usage for org.springframework.security.oauth2.common.exceptions InsufficientScopeException getMessage.

Prototype

public String getMessage() 

Source Link

Document

Returns the detail message string of this throwable.

Usage

From source file:org.springframework.security.oauth2.common.exception.OAuth2ExceptionJackson2DeserializerTests.java

@Test
public void readValueIsufficientScope() throws Exception {
    String accessToken = "{\"error\": \"insufficient_scope\", \"error_description\": \"insufficient scope\", \"scope\": \"bar foo\"}";
    InsufficientScopeException result = (InsufficientScopeException) mapper.readValue(accessToken,
            OAuth2Exception.class);
    assertEquals("insufficient scope", result.getMessage());
    assertEquals("bar foo", result.getAdditionalInformation().get("scope").toString());
}