Class: Reflex::OAuthServer
Class Method Summary collapse
-
.get_providers ⇒ Object
Get all providers with API-keys configured.
-
.session_get_profile(oauth_session) ⇒ Object
Returns a generic (same for all providers) list of profiledata given a OAuthSession.
-
.token_access(params) ⇒ Object
Grant access to token.
-
.token_request(provider) ⇒ Object
Request a token.
-
.token_set_user_id(user_id, oauth_session) ⇒ Object
Identify the user.
-
.user_get_profile(user_id, provider) ⇒ Object
Returns a generic (same for all providers) list of profiledata.
-
.user_get_providers(user_id) ⇒ Object
Return a list of providers that the user is connected to.
-
.user_remove_provider(user_id, provider) ⇒ Object
Remove the connection between a user and a provider.
Methods inherited from Base
Class Method Details
.get_providers ⇒ Object
Get all providers with API-keys configured
5 6 7 |
# File 'lib/reflex/oauth_server.rb', line 5 def get_providers call!("OAuthServer.getProviders") end |
.session_get_profile(oauth_session) ⇒ Object
Returns a generic (same for all providers) list of profiledata given a OAuthSession
42 43 44 |
# File 'lib/reflex/oauth_server.rb', line 42 def session_get_profile(oauth_session) call!("OAuthServer.sessionGetProfile", oauth_session) end |
.token_access(params) ⇒ Object
Grant access to token. Second step of the authentication process.
15 16 17 |
# File 'lib/reflex/oauth_server.rb', line 15 def token_access(params) call!("OAuthServer.tokenAccess", params) end |
.token_request(provider) ⇒ Object
Request a token. First step of the authentication process.
10 11 12 |
# File 'lib/reflex/oauth_server.rb', line 10 def token_request(provider) call!("OAuthServer.tokenRequest", provider) end |
.token_set_user_id(user_id, oauth_session) ⇒ Object
Identify the user. Stores the relation between the third party id and the user_id. Third step of the authentication process.
21 22 23 |
# File 'lib/reflex/oauth_server.rb', line 21 def token_set_user_id(user_id, oauth_session) call!("OAuthServer.tokenSetUserId", user_id, oauth_session) end |
.user_get_profile(user_id, provider) ⇒ Object
Returns a generic (same for all providers) list of profiledata
36 37 38 |
# File 'lib/reflex/oauth_server.rb', line 36 def user_get_profile(user_id, provider) call!("OAuthServer.userGetProfile", user_id, provider) end |
.user_get_providers(user_id) ⇒ Object
Return a list of providers that the user is connected to
26 27 28 |
# File 'lib/reflex/oauth_server.rb', line 26 def user_get_providers(user_id) call!("OAuthServer.userGetProviders", user_id) end |
.user_remove_provider(user_id, provider) ⇒ Object
Remove the connection between a user and a provider
31 32 33 |
# File 'lib/reflex/oauth_server.rb', line 31 def user_remove_provider(user_id, provider) call!("OAuthServer.userRemoveProvider", user_id, provider) end |