Sha256: e5428fb7583ca83799e78d73229b42105990b9f829271685bf98f9035e1746a9
Contents?: true
Size: 946 Bytes
Versions: 3
Compression:
Stored size: 946 Bytes
Contents
module OAuth2 module Strategy # The Resource Owner Password Credentials Authorization Strategy # # @see http://tools.ietf.org/html/draft-ietf-oauth-v2-15#section-4.3 class Password < Base # Not used for this strategy # # @raise [NotImplementedError] def authorize_url raise NotImplementedError, "The authorization endpoint is not used in this strategy" end # Retrieve an access token given the specified End User username and password. # # @param [String] username the End User username # @param [String] password the End User password # @param [Hash] params additional params def get_token(username, password, params={}) params = {'grant_type' => 'password', 'username' => username, 'password' => password}.merge(client_params).merge(params) @client.get_token(params) end end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
panjiva-oauth2-0.5.1 | lib/oauth2/strategy/password.rb |
panjiva-oauth2-0.5.0 | lib/oauth2/strategy/password.rb |
oauth2-0.5.0 | lib/oauth2/strategy/password.rb |