Rivet.Auth.Token.Verify (rivet_ident v3.5.0)

View Source

Verify tokens meet our requirements

Summary

Functions

Checks JWT against configured secrets for that type. Returns claims if a valid JWT is found, but does no authentication/authorization.

Functions

jwt(jwt, type)

Checks JWT against configured secrets for that type. Returns claims if a valid JWT is found, but does no authentication/authorization.

NOTE: These test will stop working with diff jwt keys

iex> jwt("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJjYWExOmFjYzpleGFtcGxlLmNvbSIsImV4cCI6MTY3ODMxMTEwMywiZm9yIjp7fSwic3ViIjoiY2FzMTpuYXJmIn0.qMH6Tr_vvfQ4lmLnPilordYbfgv4ZDzCY2yAc8D8RVQ", :acc) {:ok, %{aud: "caa1:acc:example.com", exp: 1678311103, for: %{}, sub: "cas1:narf"}}