Module: AuthServlet
- Defined in:
- lib/msf/core/web_services/servlet/auth_servlet.rb
Class Method Summary collapse
- .api_account_path ⇒ Object
- .api_generate_token_path ⇒ Object
- .api_login_path ⇒ Object
- .api_logout_path ⇒ Object
- .api_path ⇒ Object
- .api_unauthenticated_path ⇒ Object
- .registered(app) ⇒ Object
Class Method Details
.api_account_path ⇒ Object
7 8 9 |
# File 'lib/msf/core/web_services/servlet/auth_servlet.rb', line 7 def self.api_account_path "#{AuthServlet.api_path}/account" end |
.api_generate_token_path ⇒ Object
19 20 21 |
# File 'lib/msf/core/web_services/servlet/auth_servlet.rb', line 19 def self.api_generate_token_path "#{AuthServlet.api_path}/generate-token" end |
.api_login_path ⇒ Object
11 12 13 |
# File 'lib/msf/core/web_services/servlet/auth_servlet.rb', line 11 def self.api_login_path "#{AuthServlet.api_path}/login" end |
.api_logout_path ⇒ Object
15 16 17 |
# File 'lib/msf/core/web_services/servlet/auth_servlet.rb', line 15 def self.api_logout_path "#{AuthServlet.api_path}/logout" end |
.api_path ⇒ Object
3 4 5 |
# File 'lib/msf/core/web_services/servlet/auth_servlet.rb', line 3 def self.api_path '/api/v1/auth' end |
.api_unauthenticated_path ⇒ Object
23 24 25 |
# File 'lib/msf/core/web_services/servlet/auth_servlet.rb', line 23 def self.api_unauthenticated_path "#{AuthServlet.api_path}/unauthenticated" end |
.registered(app) ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/msf/core/web_services/servlet/auth_servlet.rb', line 27 def self.registered(app) app.get AuthServlet.api_account_path, &get_api_account app.get AuthServlet.api_login_path, &get_login app.post AuthServlet.api_login_path, &post_login app.get AuthServlet.api_logout_path, &get_logout app.post AuthServlet.api_generate_token_path, &post_generate_token app.post "#{AuthServlet.api_unauthenticated_path}/?:scope?", &post_unauthenticated end |