26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
# File 'lib/stormpath/rails/router.rb', line 26
def stormpath_rails_routes(actions: {})
actions = STORMPATH_DEFAULT_ACTIONS_MAP.merge(actions)
constraints Stormpath::Rails::RoutingConstraint do
if Stormpath::Rails.config.web.register.enabled
get Stormpath::Rails.config.web.register.uri => actions['register#new'], as: :new_register
post Stormpath::Rails.config.web.register.uri => actions['register#create'], as: :register
end
if Stormpath::Rails.config.web.login.enabled
get Stormpath::Rails.config.web.login.uri => actions['login#new'], as: :new_login
post Stormpath::Rails.config.web.login.uri => actions['login#create'], as: :login
end
if Stormpath::Rails.config.web.logout.enabled
post Stormpath::Rails.config.web.logout.uri => actions['logout#create'], as: :logout
end
if Stormpath::Rails.config.web.forgot_password.enabled
get Stormpath::Rails.config.web.forgot_password.uri => actions['forgot_password#new'], as: :new_forgot_password
post Stormpath::Rails.config.web.forgot_password.uri => actions['forgot_password#create'], as: :forgot_password
end
if Stormpath::Rails.config.web.change_password.enabled
get Stormpath::Rails.config.web.change_password.uri => actions['change_password#new'], as: :new_change_password
post Stormpath::Rails.config.web.change_password.uri => actions['change_password#create'], as: :change_password
end
if Stormpath::Rails.config.web.me.enabled
get Stormpath::Rails.config.web.me.uri => actions['profile#show']
end
if Stormpath::Rails.config.web.oauth2.enabled
get Stormpath::Rails.config.web.oauth2.uri => actions['oauth2#new']
post Stormpath::Rails.config.web.oauth2.uri => actions['oauth2#create']
end
if Stormpath::Rails.config.web.verify_email.enabled
get Stormpath::Rails.config.web.verify_email.uri => actions['verify_email#show'], as: :new_verify_email
post Stormpath::Rails.config.web.verify_email.uri => actions['verify_email#create'], as: :verify_email
end
if Stormpath::Rails.config.web.facebook_app_id
get Stormpath::Rails.config.web.social.facebook.uri => actions['facebook#create'], as: :facebook_callback
end
if Stormpath::Rails.config.web.github_app_id
get Stormpath::Rails.config.web.social.github.uri => actions['github#create'], as: :github_callback
end
if Stormpath::Rails.config.web.google_app_id
get Stormpath::Rails.config.web.social.google.uri => actions['google#create'], as: :google_callback
end
if Stormpath::Rails.config.web.linkedin_app_id
get Stormpath::Rails.config.web.social.linkedin.uri => actions['linkedin#create'], as: :linkedin_callback
end
if Stormpath::Rails.config.web.callback.enabled
get Stormpath::Rails.config.web.callback.uri => actions['id_site_callback#new'], as: :id_site_result
end
end
end
|