Skip to content

Commit

Permalink
[CARD-75] Tidy decode function
Browse files Browse the repository at this point in the history
  • Loading branch information
jrsmth-tier2 committed Apr 19, 2024
1 parent 22723d4 commit ff4d3d6
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/app/core/service/auth/token.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,16 @@ export class TokenService {
if (!token) return null

const decoded: any = jwtDecode(token);
/** TODO :: how to verify... using secret (bad idea) :: speak to DAN re auth... or Paul on Monday... see diagram (then write up on MIRO and test it out...)
* is the model to soft force a login but require any actions to be authenticated on the backend (dumb client?)
*
* Have a go at breaking this without hasValidSig...
* With just expiry I can force entry to /fit-track...
* eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyLCJleHAiOjE4MzQ5Njc4OTB9.H_r9p5ppIZPi3FUQoN2XfA-MGfO2a3yurNErUnw6iNo
* TokenFilter -> Servlet Exception should throw 401's (not 500) for faulty token...
*/
return Token.convert(decoded);
}

/** TODO :: how to verify... using secret (bad idea) :: speak to DAN re auth... or Paul on Monday... see diagram (then write up on MIRO and test it out...)
* is the model to soft force a login but require any actions to be authenticated on the backend (dumb client?)
*
* Have a go at breaking this without hasValidSig...
* With just expiry I can force entry to /fit-track...
* eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyLCJleHAiOjE4MzQ5Njc4OTB9.H_r9p5ppIZPi3FUQoN2XfA-MGfO2a3yurNErUnw6iNo
* TokenFilter -> Servlet Exception should throw 401's (not 500) for faulty token...
*/

}

0 comments on commit ff4d3d6

Please sign in to comment.