config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuthProperties

type BasicAuthProperties struct {
	Username string
	Password string
	Roles    []string
}

type BasicSecurityProperties

type BasicSecurityProperties struct {
	Users []*BasicAuthProperties
}

type HttpSecurityProperties

type HttpSecurityProperties struct {
	PublicUrls    []string
	ProtectedUrls []*UrlToRole
	BasicAuth     *BasicSecurityProperties `default:"{}"`
	Jwt           *JwtSecurityProperties   `default:"{}"`
}

func NewHttpSecurityProperties

func NewHttpSecurityProperties(loader config.Loader) (*HttpSecurityProperties, error)

func (*HttpSecurityProperties) PostBinding

func (h *HttpSecurityProperties) PostBinding() error

func (HttpSecurityProperties) Prefix

func (h HttpSecurityProperties) Prefix() string

type JwtSecurityProperties

type JwtSecurityProperties struct {
	PublicKey string
	Algorithm string `default:"RS256"`
	Type      string `default:"JWT_TOKEN_MOBILE"`
}

func (JwtSecurityProperties) IsAlgEs

func (j JwtSecurityProperties) IsAlgEs() bool

func (JwtSecurityProperties) IsAlgRs

func (j JwtSecurityProperties) IsAlgRs() bool

type UrlToRole

type UrlToRole struct {
	Method                             string
	UrlPattern                         string
	Roles                              []string
	UnauthorizedWwwAuthenticateHeaders []string
	// contains filtered or unexported fields
}

func (UrlToRole) UrlRegexp

func (u UrlToRole) UrlRegexp() *regexp.Regexp

Jump to

Keyboard shortcuts

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