question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ValidationHandler issues in version 5.0.0

See original GitHub issue

Hey! First off, good work on reducing bundle-size when moving to browser-API’s instead of 3rd party libs! However, there’s some new issues with the JwksValidationHandler:

First off, the inferred algorithm is missing a hyphen when compared to the accepted algorithms listed on the API documentation for SubtleCrypto#digest:

https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest

In my case the inferred algorithm is sha256, but the missing hyphen leaves me with this exception when it runs crypto.subtle.digest():

DOMException: Algorithm: Unrecognized name

I think this can be sorted by adding the hyphen here: https://github.com/manfredsteyer/angular-oauth2-oidc/blob/master/projects/lib/src/token-validation/validation-handler.ts#L78 so the inferred algorithm would be sha-256

Secondly, in ValidationHandler#validateAtHash I get this error: angular-oauth2-oidc.js?5916:1185 DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range. when running btoa(leftMostHalf) located here: https://github.com/manfredsteyer/angular-oauth2-oidc/blob/master/projects/lib/src/token-validation/validation-handler.ts#L49

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
manfredsteyercommented, Oct 24, 2018

Thx again for this report. Unfortunately, we’ve tested this under the wrong circumstances. Now it works as before using jsrasign.

But we are sill looking into ways to get rid of it.

https://github.com/manfredsteyer/angular-oauth2-oidc/releases/tag/5.0.2

3reactions
enterprisebugcommented, Oct 24, 2018

Same with me. When using JwksValidationHandler i get the error in console: 2018-10-24 12_48_10-about - aistoxt

of course the error goes away when using a NullValidationHandler

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dependency injection with class-validator #528 - nestjs/nest
fmeynard opened this issue on Mar 26, 2018 · 45 comments ... Hello Nestjs entrepreneurs, in core version : 5.0.0-beta.6 I implement.
Read more >
Validation · Bootstrap v5.0
Bootstrap scopes the :invalid and :valid styles to parent .was-validated class, usually applied to the <form> . Otherwise, any required field without a...
Read more >
Ajv: Another JSON Schema Validator - Gitlab
Ajv version 6.0.0 that supports draft-07 is released. It may require either migrating your schemas or updating your code (to continue using draft-04...
Read more >
Validation features — Cornice 5.0.0 documentation
description is a description of the problem encountered. You can override the default JSON error handler for a view with your own callable....
Read more >
Spring 5 Webflux functional endpoints - How to perform input ...
In Spring version 5.0, there is no automatic way to do validation in functional endpoints, and as such validation must be done manually....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found