Documentation ¶
Index ¶
- func GetAccess(ctx context.Context) []address.Address
- func GetGlobalRead(ctx context.Context) bool
- func HasAccess(ctx context.Context, addr address.Address) bool
- func WithAccess(ctx context.Context, addrs []address.Address) context.Context
- func WithGlobalRead(ctx context.Context, globalRead bool) context.Context
- type ApiSecretDecoder
- type FileSecretLoader
- type Handler
- type JwtPayload
- type SecretLoader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGlobalRead ¶
Types ¶
type ApiSecretDecoder ¶
type ApiSecretDecoder struct {
// contains filtered or unexported fields
}
func NewApiSecretDecoder ¶
func NewApiSecretDecoder(secretLoader SecretLoader) *ApiSecretDecoder
type FileSecretLoader ¶
type FileSecretLoader struct {
// contains filtered or unexported fields
}
func NewSecretLoader ¶
func NewSecretLoader(secretPath string, expiryPeriod time.Duration) *FileSecretLoader
type Handler ¶
type Handler struct { Verify func(ctx context.Context, token string) (JwtPayload, error) Next http.HandlerFunc }
type JwtPayload ¶
type JwtPayload struct { GlobalRead bool Access []address.Address Allow []auth.Permission }
type SecretLoader ¶
Click to show internal directories.
Click to hide internal directories.