Class: GHRH::Auth
- Inherits:
-
Object
- Object
- GHRH::Auth
- Defined in:
- lib/ghrh/auth.rb
Class Method Summary collapse
Class Method Details
.perform(user, pass) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/ghrh/auth.rb', line 3 def self.perform(user, pass) GHRH::Client.basic_auth user, pass body = GHRH::Client.post('/authorizations', { :body => {:scopes => %w{public_repo repo}, :note => 'ghrh', :note_url => 'https://github.com/r4um/ghrh'}.to_json}) token = body['token'] end |