Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

feat: allow token introspection as an authz option #44

Merged
merged 3 commits into from
Jul 22, 2021
Merged

Conversation

rsmayda
Copy link
Contributor

@rsmayda rsmayda commented Jul 10, 2021

Description of changes:

  • Added IntrospectionOptions
  • Defaults to use introspection if configuration is given
  • Made jwksEndpoint optional
  • made decodeJwtToken its own method
  • Changed the AuthZ errors from logging as error to log as warn

Coverage results:

-----------------------------|---------|----------|---------|---------|-------------------
File                         | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-----------------------------|---------|----------|---------|---------|-------------------
All files                    |   98.93 |    95.85 |     100 |   98.91 |
 loggerBuilder.ts            |     100 |      100 |     100 |     100 |
 smartAuthorizationHelper.ts |   97.22 |    94.23 |     100 |    97.2 | 186,210,220
 smartHandler.ts             |     100 |    96.04 |     100 |     100 | 204,280,285,303
 smartScopeHelper.ts         |     100 |     97.5 |     100 |     100 | 62
-----------------------------|---------|----------|---------|---------|-------------------

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@rsmayda rsmayda self-assigned this Jul 10, 2021
@rsmayda rsmayda added the enhancement New feature or request label Jul 10, 2021
@rsmayda rsmayda requested review from carvantes and Bingjiling July 10, 2021 18:42
Copy link
Contributor

@carvantes carvantes left a comment

Choose a reason for hiding this comment

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

Overall looks good. Just a couple comments that may make the new config clearer

src/smartHandler.ts Outdated Show resolved Hide resolved
src/smartConfig.ts Outdated Show resolved Hide resolved
@rsmayda rsmayda requested a review from carvantes July 14, 2021 13:26
@rsmayda rsmayda merged commit f123621 into mainline Jul 22, 2021
@rsmayda rsmayda deleted the introspection branch July 22, 2021 19:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request size/m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants