Module: Googl::OAuth2
- Extended by:
- OAuth2
- Included in:
- OAuth2
- Defined in:
- lib/googl.rb,
lib/googl/oauth2/utils.rb,
lib/googl/oauth2/native.rb,
lib/googl/oauth2/server.rb
Overview
OAuth 2.0
Google supports three flows of OAuth 2.0
-
client-side
-
server-side
-
native application
Now, gem googl support only client-side and native application.
Defined Under Namespace
Modules: Utils Classes: Native, Server
Instance Method Summary collapse
-
#native(client_id, client_secret) ⇒ Object
OAuth 2.0 for native applications.
-
#server(client_id, client_secret, redirect_uri) ⇒ Object
OAuth 2.0 for server-side web applications.
Instance Method Details
#native(client_id, client_secret) ⇒ Object
OAuth 2.0 for native applications
The native application flow for desktop and mobile applications
client = Googl::OAuth2.native("client_id", "client_secret")
138 139 140 |
# File 'lib/googl.rb', line 138 def native(client_id, client_secret) Googl::OAuth2::Native.new(client_id, client_secret) end |
#server(client_id, client_secret, redirect_uri) ⇒ Object
OAuth 2.0 for server-side web applications
The server-side flow for web applications with servers that can securely store persistent information
client = Googl::OAuth2.server("client_id", "client_secret", "redirect_uri")
128 129 130 |
# File 'lib/googl.rb', line 128 def server(client_id, client_secret, redirect_uri) Googl::OAuth2::Server.new(client_id, client_secret, redirect_uri) end |