Class: Oauth2Verifier
- Inherits:
-
OauthToken
- Object
- ActiveRecord::Base
- OauthToken
- Oauth2Verifier
show all
- Defined in:
- lib/generators/mongoid/oauth_provider_templates/oauth2_verifier.rb,
lib/generators/active_record/oauth_provider_templates/oauth2_verifier.rb
Instance Method Summary
(collapse)
Methods inherited from OauthToken
#authorized?, #invalidate!, #invalidated?, #to_query
Instance Method Details
- (Object) code
10
11
12
|
# File 'lib/generators/mongoid/oauth_provider_templates/oauth2_verifier.rb', line 10
def code
token
end
|
- (Object) exchange!(params = {})
4
5
6
7
8
9
10
|
# File 'lib/generators/mongoid/oauth_provider_templates/oauth2_verifier.rb', line 4
def exchange!(params={})
OauthToken.transaction do
token = Oauth2Token.create! :user=>user,:client_application=>client_application
invalidate!
token
end
end
|
- (Object) redirect_url
14
15
16
|
# File 'lib/generators/mongoid/oauth_provider_templates/oauth2_verifier.rb', line 14
def redirect_url
callback_url
end
|