mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-27 10:28:41 -05:00
Add basic HTTP authentication and /token routes
- the only initial backend option for auth is LDAP
This commit is contained in:
parent
331ac33b53
commit
e447b754c3
3 changed files with 134 additions and 0 deletions
|
|
@ -11,6 +11,18 @@ module Vmpooler
|
|||
call env.merge("PATH_INFO" => "/api/v#{api_version}/summary")
|
||||
end
|
||||
|
||||
post '/token/?' do
|
||||
call env.merge("PATH_INFO" => "/api/v#{api_version}/token")
|
||||
end
|
||||
|
||||
get '/token/:token/?' do
|
||||
call env.merge("PATH_INFO" => "/api/v#{api_version}/token/#{params[:token]}")
|
||||
end
|
||||
|
||||
delete '/token/:token/?' do
|
||||
call env.merge("PATH_INFO" => "/api/v#{api_version}/token/#{params[:token]}")
|
||||
end
|
||||
|
||||
get '/vm/?' do
|
||||
call env.merge("PATH_INFO" => "/api/v#{api_version}/vm")
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue