Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3LO - Installed app support #52

Closed
wants to merge 2 commits into from
Closed

Conversation

sqrrrl
Copy link
Contributor

@sqrrrl sqrrrl commented Nov 13, 2015

Authorizer tailored to scripts/command line apps, ported from google-apis-ruby-client.

Strictly speaking, doesn't need to be a separate authorizer. OOB is fairly trivial to do with the plain UserAuthorizer and the embedded server part could be its own thing. But this does make it relatively trivial to implement CLIs that can switch modes easily...

credentials = authorizer.get_credentials(options[:user] || 'default') do |auth|
  if options[:headless]
    puts "Open #{auth.oob_auth_url} to authorize and enter the provided code below:"
    gets
  else
    auth.authorize_with_local_server
  end
end

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 13, 2015
@sqrrrl
Copy link
Contributor Author

sqrrrl commented Nov 19, 2015

@tbetbetbe ping

@sqrrrl sqrrrl closed this Jan 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants