Documentation
¶
Index ¶
- func GenerateJWTToken(claims jwt.Claims, privateKey *rsa.PrivateKey) (string, error)
- func VerifyPrivateKeyFormat(privateKey string) (*rsa.PrivateKey, error)
- func VerifyPublicKeyFormat(publicKey string) (*rsa.PublicKey, error)
- func VerifyTokenRSA(tokenString string, publicKey *rsa.PublicKey) (*jwt.Token, error)
- type Config
- type Middleware
- type RSAkeys
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateJWTToken ¶
func VerifyPrivateKeyFormat ¶
func VerifyPrivateKeyFormat(privateKey string) (*rsa.PrivateKey, error)
Types ¶
type Config ¶
type Config struct {
AuthenticatedPrefix string `yaml:"GAG_AUTHENTICATED_PREFIX"`
UnauthenticatedPrefix string `yaml:"GAG_UNATHETICATED_PREFIX"` // 1. CHANGE THESE TO SNAKE CASE
JwtRSAPublicKey string `yaml:"GAG_JWT_RSA_PUBLIC_KEY"`
JwtRSAPrivateKey string `yaml:"GAG_JWT_RSA_PRIVATE_KEY"`
ServerAddress string `yaml:"SERVER_ADDRESS"`
DestinationURL string `yaml:"GAG_DESTINATION_URL"`
CorsApiKey string `yaml:"CORS_API_KEY"`
Mode string `yaml:"MODE"`
}
func ParseYamlFile ¶
type Middleware ¶
func MiddlewareStack ¶
func MiddlewareStack(middlewares ...Middleware) Middleware
Click to show internal directories.
Click to hide internal directories.