Add temporary parameter to ignore state with oauth2 basic
This commit is contained in:
parent
4966993246
commit
e2e999014f
|
@ -14,4 +14,5 @@ en:
|
||||||
oauth2_send_auth_header: "Send the token as an HTTP Authorization header"
|
oauth2_send_auth_header: "Send the token as an HTTP Authorization header"
|
||||||
oauth2_debug_auth: "Include rich debugging information in your logs"
|
oauth2_debug_auth: "Include rich debugging information in your logs"
|
||||||
oauth2_authorize_options: "When authorizing request these options"
|
oauth2_authorize_options: "When authorizing request these options"
|
||||||
|
oauth2_ignore_state: "Don't validate the state parameter. This will be removed shortly!"
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ login:
|
||||||
oauth2_email_verified: false
|
oauth2_email_verified: false
|
||||||
oauth2_send_auth_header: true
|
oauth2_send_auth_header: true
|
||||||
oauth2_debug_auth: false
|
oauth2_debug_auth: false
|
||||||
|
oauth2_ignore_state: true
|
||||||
oauth2_authorize_options:
|
oauth2_authorize_options:
|
||||||
default: 'scope'
|
default: 'scope'
|
||||||
type: list
|
type: list
|
||||||
|
|
|
@ -29,7 +29,7 @@ class OAuth2BasicAuthenticator < ::Auth::OAuth2Authenticator
|
||||||
opts = env['omniauth.strategy'].options
|
opts = env['omniauth.strategy'].options
|
||||||
opts[:client_id] = SiteSetting.oauth2_client_id
|
opts[:client_id] = SiteSetting.oauth2_client_id
|
||||||
opts[:client_secret] = SiteSetting.oauth2_client_secret
|
opts[:client_secret] = SiteSetting.oauth2_client_secret
|
||||||
opts[:provider_ignores_state] = true
|
opts[:provider_ignores_state] = SiteSetting.oauth2_ignore_state
|
||||||
opts[:client_options] = {
|
opts[:client_options] = {
|
||||||
authorize_url: SiteSetting.oauth2_authorize_url,
|
authorize_url: SiteSetting.oauth2_authorize_url,
|
||||||
token_url: SiteSetting.oauth2_token_url
|
token_url: SiteSetting.oauth2_token_url
|
||||||
|
|
Loading…
Reference in New Issue