module Security::API
Public Instance Methods
validate_client()
click to toggle source
Por ejemplo [
{:client_id => 'web_client', :token_password => ''}
]
# File lib/security/api.rb, line 8 def validate_client if(@env["HTTP_CLIENT_AUTH"]) client_id, token_password = @env["HTTP_CLIENT_AUTH"].split(':') @clients.each do |iter| @client = iter if(iter[:client_id] == client_id && iter[:token_password] == token_password) end unless(@client) halt 503 end else halt 503 end end