Class: Doorkeeper::OAuth::ClientAuthentication::ClientSecretPost
- Inherits:
-
Object
- Object
- Doorkeeper::OAuth::ClientAuthentication::ClientSecretPost
- Defined in:
- lib/doorkeeper/oauth/client_authentication/client_secret_post.rb
Overview
RFC 6749 ยง2.3.1 "client_secret_post": client credentials are sent in the request body. The query string is intentionally ignored so that credentials must be supplied in the body as the spec requires.
Class Method Summary collapse
Class Method Details
.authenticate(request) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/doorkeeper/oauth/client_authentication/client_secret_post.rb', line 22 def self.authenticate(request) params = request.request_parameters.with_indifferent_access Doorkeeper::ClientAuthentication::Credentials.new( params[:client_id], params[:client_secret], ) end |
.matches_request?(request) ⇒ Boolean
14 15 16 17 18 19 20 |
# File 'lib/doorkeeper/oauth/client_authentication/client_secret_post.rb', line 14 def self.matches_request?(request) params = request.request_parameters.with_indifferent_access request.post? && params[:client_id].present? && params[:client_secret].present? end |
.uses_shared_secret? ⇒ Boolean
10 11 12 |
# File 'lib/doorkeeper/oauth/client_authentication/client_secret_post.rb', line 10 def self.uses_shared_secret? true end |