login

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomKey

func RandomKey() string

Types

type AuthInfo

type AuthInfo struct {
	Nonce string
}

type Authenticated

type Authenticated struct {
}

type DigestAuth

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

func NewDigestAuth

func NewDigestAuth(secretProvider SecretProvider) *DigestAuth

func (*DigestAuth) CheckSign

func (digestAuth *DigestAuth) CheckSign(ctx *gin.Context) (any, error)

func (*DigestAuth) HasSign

func (digestAuth *DigestAuth) HasSign(ctx *gin.Context) bool

func (*DigestAuth) JustCheck

func (digestAuth *DigestAuth) JustCheck(ctx *gin.Context) (any, error)

func (*DigestAuth) Logout

func (digestAuth *DigestAuth) Logout(ctx *gin.Context) (any, error)

type SecretProvider

type SecretProvider func(user string) string

SecretProvider key = md5(md5(p)+u) sign = md5(key+nonce)

type User

type User struct {
	Username string
	Response string
	Nonce    string
}

Jump to

Keyboard shortcuts

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