Skip to content

Create new user-token controller and use-case for /token endpoint #11

@ShreyasPrasad

Description

@ShreyasPrasad

As described in step 7 of the login flow, upon querying the /token endpoint of the microservice with a valid authorization code retrieved from previous steps, a signed JWT with the following serialized properties should be returned:

  1. email: the waterloo email corresponding to the user
  2. id: a unique id representing the user (this could just be the UUID assigned to the user entity)

Note that based on the parameters to the /token endpoint (described here), this should happen only if the following conditions are true:

  1. The provided auth code exists and is valid (i.e points to the correct clientId)
  2. The EncryptedClientSecret corresponding to the clientId matches the provided client_secret.

This endpoint should appropriately sanitize query/body parameters (refer to how other use-cases achieve this through parsing middleware) and be sufficiently unit tested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions