Categorygithub.com/aacfactory/fns-contrib/authorizations/encoding/jwt
package
1.0.0
Repository: https://github.com/aacfactory/fns-contrib.git
Documentation: pkg.go.dev

# README

JWT ENCODING

JWT Authorizations。

Install

go get github.com/aacfactory/fns-contrib/authorizations/encoding/jwt

Usage

Config

authorization:
  encoding:
    method: "RS512"
    publicKey: "path of public key"
    privateKey: "path of private key"
    issuer: ""
    audience:
      - foo
      - bar
    expirations: "720h0m0s"

Register encoding

import (
    "github.com/aacfactory/fns-contrib/authorizations/encoding/jwt"
)


authorizations.Service(jwt.Component())