Package com.okta.spring.boot.oauth
Class Okta
- java.lang.Object
-
- com.okta.spring.boot.oauth.Okta
-
public final class Okta extends Object
Okta + Spring Security utility methods.- Since:
- 1.2.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.springframework.security.config.annotation.web.builders.HttpSecurityconfigureResourceServer401ResponseBody(org.springframework.security.config.annotation.web.builders.HttpSecurity http)Configures thehttpto return a NON-EMPTY response body if the client supports the Media Type text/plain.static org.springframework.security.config.web.server.ServerHttpSecurityconfigureResourceServer401ResponseBody(org.springframework.security.config.web.server.ServerHttpSecurity http)Configures thehttpto return a NON-EMPTY response body if the client supports the Media Type text/plain.
-
-
-
Method Detail
-
configureResourceServer401ResponseBody
public static org.springframework.security.config.web.server.ServerHttpSecurity configureResourceServer401ResponseBody(org.springframework.security.config.web.server.ServerHttpSecurity http)
Configures thehttpto 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`.- Parameters:
http- the ServerHttpSecurity to configure- Returns:
- the
httpto allow method chaining
-
configureResourceServer401ResponseBody
public static org.springframework.security.config.annotation.web.builders.HttpSecurity configureResourceServer401ResponseBody(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws ExceptionConfigures thehttpto 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`.- Parameters:
http- the HttpSecurity to configure- Returns:
- the
httpto allow method chaining - Throws:
Exception
-
-