Module: Mumukit::Login
- Defined in:
- lib/mumukit/login/version.rb,
lib/mumukit/login.rb,
lib/mumukit/login.rb
Defined Under Namespace
Modules: AuthenticationHelpers, AuthorizationHelpers, Framework, LoginControllerHelpers, Profile, Provider, UserPermissionsHelpers
Classes: Controller, Form, JWTCurrentUserStore, OriginRedirector, SessionCurrentUserStore, Settings
Constant Summary
collapse
- VERSION =
"1.0.0"
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
31
32
33
|
# File 'lib/mumukit/login.rb', line 31
def self.config
@config
end
|
11
12
13
14
|
# File 'lib/mumukit/login.rb', line 11
def self.configure
@config ||= defaults
yield @config
end
|
71
72
73
|
# File 'lib/mumukit/login.rb', line 71
def self.configure_controller!(native)
framework.configure_controller! native
end
|
67
68
69
|
# File 'lib/mumukit/login.rb', line 67
def self.configure_login_controller!(native)
framework.configure_login_controller!(native)
end
|
63
64
65
|
# File 'lib/mumukit/login.rb', line 63
def self.configure_login_routes!(native)
framework.configure_login_routes! native
end
|
Configures omniauth. This method typically configures and sets the omniauth provider. Typical config should look like this
Rails.application.config.middleware.use OmniAuth::Builder do
Mumukit::Login.configure_omniauth! self
end
59
60
61
|
# File 'lib/mumukit/login.rb', line 59
def self.configure_omniauth!(omniauth)
provider.configure_omniauth! omniauth
end
|
.defaults ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/mumukit/login.rb', line 16
def self.defaults
struct.tap do |config|
config.provider = Mumukit::Login::Provider.from_env
config.saml = struct base_url: ENV['MUMUKI_SAML_BASE_URL'],
idp_sso_target_url: ENV['MUMUKI_SAML_IDP_SSO_TARGET_URL'],
idp_slo_target_url: ENV['MUMUKI_SAML_IDP_SLO_TARGET_URL'],
translation_name: ENV['MUMUKI_SAML_TRANSLATION_NAME'] || 'name',
translation_email: ENV['MUMUKI_SAML_TRANSLATION_EMAIL'] || 'email',
translation_image: ENV['MUMUKI_SAML_TRANSLATION_IMAGE'] || 'image'
config.auth0 = struct client_id: ENV['MUMUKI_AUTH0_CLIENT_ID'],
client_secret: ENV['MUMUKI_AUTH0_CLIENT_SECRET'],
domain: ENV['MUMUKI_AUTH0_DOMAIN']
end
end
|