Skip to content

Conversation

@SteveyblamWork
Copy link

@SteveyblamWork SteveyblamWork commented Jan 27, 2020

A recent merge to master added support for tls_client_auth scheme by providing an auth scheme value that would only add the client_id to the request body. The Private Key JWT scheme includes the client_id in the client_assertion and so is not needed in the main request body.

This PR simply returns unaltered params when private_key_jwt is specified as the auth_scheme and adds tls support for v1.4

I have also dropped the INFO/DEBUG from the client spec as it appears to switch between the two depending on the ruby version. I thought this was neater and simpler than writing a complex set of contexts for different versions. Especially considering that the important aspect is the output information rather than the label.

@coveralls
Copy link

coveralls commented Jan 27, 2020

Pull Request Test Coverage Report for Build 966

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 95.963%

Totals Coverage Status
Change from base Build 930: 0.03%
Covered Lines: 309
Relevant Lines: 322

💛 - Coveralls

when :tls_client_auth
apply_client_id(params)
when :private_key_jwt
params
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SteveyblamFreeagent just straight params? The comment on line 49 appears to imply that apply_client_id would be used for private_key_jwt also.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking at this Peter. Straight params is expected behaviour as private_key_jwt wraps up the client_id in the assertion so it's not passed in the request body. But you're absolutely right the comment was from a previous commit where I was applying the client_id. I'll change the comment now.

Many thanks

fix incorrect assertion in authenticator_spec

updates expected debugging output to include INFO instead of DEBUG

reduces specificity of test on debug output to allow for the difference between ruby versions

corrects text for authenticator_spec

Updates comments in authenticator to reflect apply_client_id not being used for private_key_jwt
@pboling pboling merged commit 3a9c7b3 into ruby-oauth:1-4-stable Jan 28, 2020
@pboling pboling added this to the 1.4.3 milestone Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants