Additional parameters when obtaining request token
See original GitHub issuePlease let me know if I am reading the spec wrong. Under section 6.1.1 of the OAuth 1.0a spec, it mentions that it is possible to provide additional parameters when obtaining a request token:
6.1.1. Consumer Obtains a Request Token
To obtain a Request Token, the Consumer sends an HTTP request to the Service Provider’s Request Token URL. The Service Provider documentation specifies the HTTP method for this request, and HTTP POST is RECOMMENDED. The request MUST be signed and contains the following parameters:
oauth_consumer_key: The Consumer Key. oauth_signature_method: The signature method the Consumer used to sign the request. oauth_signature: The signature as defined in Signing Requests. oauth_timestamp: As defined in Nonce and Timestamp. oauth_nonce: As defined in Nonce and Timestamp. oauth_version: OPTIONAL. If present, value MUST be 1.0 . Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present. Service Providers’ response to non-1.0 value is left undefined. oauth_callback: An absolute URL to which the Service Provider will redirect the User back when the Obtaining User Authorization step is completed. If the Consumer is unable to receive callbacks or a callback URL has been established via other means, the parameter value MUST be set to oob (case sensitive), to indicate an out-of-band configuration. Additional parameters: Any additional parameters, as defined by the Service Provider.
However, I notice that the getRequestToken()
does not provide a way to specify additional parameters. It isn’t possible to override as it is final, and I am unable to override prepareRequestTokenRequest
(as I could in 3.x) in order to supply these parameters, since it not only creates the request within that method, but signs it there as well using the private appendSignature
method.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:9 (9 by maintainers)
Top GitHub Comments
It’s better to use this final official RFC https://tools.ietf.org/html/rfc5849 interested section is https://tools.ietf.org/html/rfc5849#section-2.1
as for your question… I see… So making methods addOAuthParams and appendSignature protected will solve your issue?
Pull Request https://github.com/scribejava/scribejava/pull/755 merged, releasing to the central today