util

package
v0.0.0-...-e2a0a66 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpectErrorMessage

func ExpectErrorMessage(resp *http.Response, expectedMsg string)

func GenerateInvalidJwt

func GenerateInvalidJwt(jwtSecret string) string

func GenerateJwt

func GenerateJwt(jwtSecret string, expiresIn time.Duration) string

func GenerateJwtWithInvalidSigningMethod

func GenerateJwtWithInvalidSigningMethod(jwtSecret string, expiresIn time.Duration) string

func GenerateJwtWithName

func GenerateJwtWithName(jwtSecret string, expiresIn time.Duration, name string) string

func GenerateRsaPrivateKey

func GenerateRsaPrivateKey() *rsa.PrivateKey

func SendGetRequest

func SendGetRequest(url string, headers map[string]string) *http.Response

Types

type Jwt

type Jwt struct {
	// contains filtered or unexported fields
}

func NewJwt

func NewJwt(secret string) *Jwt

func NewRsaJwt

func NewRsaJwt(privKey *rsa.PrivateKey) *Jwt

func (*Jwt) String

func (j *Jwt) String() string

func (*Jwt) WithExpiresAt

func (j *Jwt) WithExpiresAt(t time.Time) *Jwt

func (*Jwt) WithName

func (j *Jwt) WithName(name string) *Jwt

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL