Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configurable HTTP options #29

Merged
merged 5 commits into from
Oct 15, 2019
Merged

Add configurable HTTP options #29

merged 5 commits into from
Oct 15, 2019

Conversation

joshcanhelp
Copy link
Contributor

@joshcanhelp joshcanhelp commented Oct 9, 2019

Description

  • Add the ability to configure custom HTTP options for all HTTP calls; does not override SDK telemetry header
  • Improve logic and error messages for ID token alg, response mode, and response type issuer checks

References

Testing

Built in v10.15.0

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks are passing

@joshcanhelp joshcanhelp added this to the v0.5.0 milestone Oct 9, 2019
'User-Agent': `${pkg.name}/${pkg.version}`,
'Auth0-Client': Buffer.from(JSON.stringify(telemetryHeader)).toString('base64')
},
timeout: 4000
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved this below to use configuration options but removed the timeout value here.

Supported types:
- ${issuer.id_token_signing_alg_values_supported.sort().join('\n- ')}
`);
const issuerTokenAlgs = Array.isArray(issuer.id_token_signing_alg_values_supported) ?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No functionality changes, just more clear logic here and improved error message when thrown.

Supported types:
- ${issuer.response_types_supported.sort().join('\n- ')}
`);
const configRespType = config.authorizationParams.response_type;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No functionality changes, just more clear logic here and improved error message when thrown.

Supported response modes:
- ${issuer.response_modes_supported.sort().join('\n- ')}
`);
const configRespMode = config.authorizationParams.response_mode;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No functionality changes, just more clear logic here and improved error message when thrown.

@joshcanhelp joshcanhelp marked this pull request as ready for review October 9, 2019 23:04
@joshcanhelp joshcanhelp requested a review from a team October 9, 2019 23:04
@joshcanhelp joshcanhelp changed the title Add http options Add configurable HTTP options Oct 9, 2019
@joshcanhelp joshcanhelp removed the request for review from a team October 10, 2019 15:08
@joshcanhelp joshcanhelp merged commit be51593 into auth0:master Oct 15, 2019
@joshcanhelp joshcanhelp deleted the add-http-options branch October 15, 2019 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants