auth

package
v0.0.1-rc9 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FullValidatePath = "integrations/rarime-auth-svc/v1/validate"
)

Variables

This section is empty.

Functions

func Authenticates

func Authenticates(claims []resources.Claim, grants ...Grant) bool

Types

type Auther

type Auther interface {
	Auth() *Client
}

func NewAuther

func NewAuther(getter kv.Getter) Auther

type Client

type Client struct {
	*http.Client
	Addr string
}

func (*Client) ValidateJWT

func (a *Client) ValidateJWT(headers http.Header) (claims []resources.Claim, err error)

type Grant

type Grant func(claim resources.Claim) bool

func GlobalRoleGrant

func GlobalRoleGrant(orgDID string, role uint32) Grant

func GroupGrant

func GroupGrant(group uuid.UUID) Grant

func OrgGrant

func OrgGrant(orgDID string) Grant

func RoleGrant

func RoleGrant(orgDID string, role uint32, group uuid.UUID) Grant

func UserGlobalRoleGrant

func UserGlobalRoleGrant(userDID, orgDID string, role uint32) Grant

func UserGrant

func UserGrant(userDID string) Grant

func UserRoleGrant

func UserRoleGrant(userDID, orgDID string, role uint32, group uuid.UUID) Grant

Jump to

Keyboard shortcuts

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