labbsr0x / whisper-client

Defines a script to be used when initializing a client app that communicates with hydra's oauth endpoints
MIT License
0 stars 1 forks source link

Introspect JWT token #3

Open eabili0 opened 5 years ago

eabili0 commented 5 years ago

IntrospectToken should check if the token is a JWT, and open it locally (without going to hydra)

claudiosegala commented 5 years ago

@abilioesteves just to confirm, the steps to this would be something like:

Configure

  1. Retrieve Hydra Public Certificate (HPC) with Json Web Keys Endpoint
  2. Store in HydraClient Struct

Instrospect Modification

  1. Verify if the token is JWT Possible using this regex: /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;, source.
  2. Validate Access Token JWT with HPC
  3. Return the info contained in the token

Questions

eabili0 commented 5 years ago

Yes! That's correct! @claudiosegala