Module: Msf::WebServices::AuthServlet

Defined in:
lib/msf/core/web_services/servlet/auth_servlet.rb

Class Method Summary collapse

Class Method Details

.api_account_pathObject



7
8
9
# File 'lib/msf/core/web_services/servlet/auth_servlet.rb', line 7

def self.
  "#{self.api_path}/account"
end

.api_generate_token_pathObject



19
20
21
# File 'lib/msf/core/web_services/servlet/auth_servlet.rb', line 19

def self.api_generate_token_path
  "#{self.api_path}/generate-token"
end

.api_login_pathObject



11
12
13
# File 'lib/msf/core/web_services/servlet/auth_servlet.rb', line 11

def self.
  "#{self.api_path}/login"
end

.api_logout_pathObject



15
16
17
# File 'lib/msf/core/web_services/servlet/auth_servlet.rb', line 15

def self.api_logout_path
  "#{self.api_path}/logout"
end

.api_pathObject



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_pathObject



23
24
25
# File 'lib/msf/core/web_services/servlet/auth_servlet.rb', line 23

def self.api_unauthenticated_path
  "#{self.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 self., &

  app.get self., &
  app.post self., &

  app.get self.api_logout_path, &get_logout
  app.post self.api_generate_token_path, &post_generate_token
  app.post "#{self.api_unauthenticated_path}/?:scope?", &post_unauthenticated
end