Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddKey ¶
*
- AddKey adds a key to the key set. If a key with the same key ID already exists,
- it will be overwritten.
func GetKeySet ¶
*
- GetKeySet returns the key set.
- If you want to modify the key set, use AddKey instead.
func ServeGRPC ¶
*
- ServeGRPC starts a GRPC server on the given port. This server
- implements the JWTKSServiceServer interface and is used to
- generate and validate JWT tokens. JWTKS gRPC Server is secure
- using SSL/TLS in all environments except `DEVENV`
- @param port The port to listen on without `:` prefix.
func ServeHTTP ¶
*
- ServeHTTP starts a HTTP server on the given port. This server
- only handles the JWKS endpoint. *
- NOTE: Actually this Service and this endpoint can hold only one
- key set. But for the sake of simplicity, we are using a single key
- called `global` and we are using the `kid` field to identify the
- key.
func SetCertificates ¶
*
- Loads the private and public key from the file at the given path.
- The file must be in PEM format.
- If no private key is given, no generation of tokens will be possible,
- but the public key can be used to validate tokens ONLY.
- If no public key is given, use the public key from the private key.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.