Lightning.Tokens (Lightning v2.14.5-pre1)

View Source

Token generation, verification and validation.

Summary

Functions

Get the subject of a token. Currently support RunTokens and PersonalAccessTokens, which return Lightning.Runs and Lightning.Accounts.Users respectively.

Verify a token and return the claims if successful.

Functions

get_subject(map)

Get the subject of a token. Currently support RunTokens and PersonalAccessTokens, which return Lightning.Runs and Lightning.Accounts.Users respectively.

verify(token)

@spec verify(String.t()) :: {:ok, map()} | {:error, any()}

Verify a token and return the claims if successful.

This serves as a central point to verify and validate different types of tokens.