public final class Okta extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.springframework.security.config.annotation.web.builders.HttpSecurity |
configureResourceServer401ResponseBody(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
Configures the
http to return a NON-EMPTY response body if the client supports the Media Type text/plain. |
static org.springframework.security.config.web.server.ServerHttpSecurity |
configureResourceServer401ResponseBody(org.springframework.security.config.web.server.ServerHttpSecurity http)
Configures the
http to return a NON-EMPTY response body if the client supports the Media Type text/plain. |
public static org.springframework.security.config.web.server.ServerHttpSecurity configureResourceServer401ResponseBody(org.springframework.security.config.web.server.ServerHttpSecurity http)
http to return a NON-EMPTY response body if the client supports the Media Type text/plain.
This is to work around an issue with Chrome, when a response body is empty, Chrome will show a `This site can’t be reached`, ERR_INVALID_RESPONSE error.
The body content will contain the HTTP Status and simple message such as `401 Unauthorized`.http - the ServerHttpSecurity to configurehttp to allow method chainingpublic static org.springframework.security.config.annotation.web.builders.HttpSecurity configureResourceServer401ResponseBody(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
throws Exception
http to return a NON-EMPTY response body if the client supports the Media Type text/plain.
This is to work around an issue with Chrome, when a response body is empty, Chrome will show a `This site can’t be reached`, ERR_INVALID_RESPONSE error.
The body content will contain the HTTP Status and simple message such as `401 Unauthorized`.http - the HttpSecurity to configurehttp to allow method chainingExceptionCopyright © 2017–2020 Okta. All rights reserved.