Categorygithub.com/nirmanlab/jwtauth
modulepackage
1.0.0
Repository: https://github.com/nirmanlab/jwtauth.git
Documentation: pkg.go.dev

# README

JwtAuth

this is not a library to create jwt token but a nice wrapper around existing "github.com/golang-jwt/jwt" to provide syntax sugar to it's users.

It provides two types.

  1. ServerAuth and,
  2. ClientAuth

our internal auth light server uses ServerAuth construct to generate new tokens. It also uses "ClientAuth" to validate and parse generated tokens.

ClientAuth needs publicKey and kid of signed token's private key to properly validate token.

# Functions

NewClientAuth create new ClientAuth.
NewServerAuth Create ServerAuth with given configurations.

# Constants

No description provided by the author

# Structs

Claims represents claims made by token.
ClientAuth represents client side authentication and authorization functionalities.
ServerAuth is used to authenticate clients.
Token represents data which can be used for authorization.

# Type aliases

No description provided by the author