Skip to content

Instantly share code, notes, and snippets.

@jeffdeville
Created April 18, 2014 19:51
Show Gist options
  • Save jeffdeville/11061519 to your computer and use it in GitHub Desktop.
Save jeffdeville/11061519 to your computer and use it in GitHub Desktop.
sso config - bacchus
developer_provider = ENV["SSO_SIMULATOR"] == "true"
ENV['DEFAULT_OMNIAUTH_PROVIDER'] = developer_provider ? 'developer' : 'openid_connect'
Rails.application.config.middleware.use OmniAuth::Builder do
provider :openid_connect, ENV['OPEN_ID_IDENTIFIER'],
"e127441e7ae57a15ff5417f3b6dc5374",
"5b7c4ba0f2a116ba823329cd1ceb08998efbf9e5fb279f7ae759e708272f9d89",
{
name: :osstools,
client_options: {
scheme: "https",
port: 443
},
userinfo_endpoint: "/user_info",
authorization_endpoint: "/authorizations/new",
token_endpoint: "/access_tokens",
scope: "openid profile email address phone",
discover: true,
jwk_url: "/jwks.json"
}
# identifier: ENV['OPEN_ID_IDENTIFIER'],
# store: OpenID::Store::Filesystem.new('/tmp')
ENV['DEFAULT_OMNIAUTH_PROVIDER'] = 'osstools'
end
OmniAuth.config.logger = Rails.logger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment