fxauthenticationcontext

package
v0.0.0-...-4ef61cc Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const AuthenticationContextKey = "_authentication_context"

Variables

This section is empty.

Functions

func Middleware

func Middleware(blockOnFailure bool) echo.MiddlewareFunc

Types

type Account

type Account struct {
	Uuid        string      `json:"id"`
	AccountType AccountType `json:"type"`
}

type AccountType

type AccountType int
const (
	UnknownAccount AccountType = iota
	BrandAccount
	RetailerAccount
)

func (AccountType) String

func (a AccountType) String() string

func (*AccountType) UnmarshalJSON

func (a *AccountType) UnmarshalJSON(data []byte) error

type AuthenticationContext

type AuthenticationContext struct {
	Uuid                 string               `json:"sub"`
	ClientId             string               `json:"cid,omitempty"`
	IdentityProviderType IdentityProviderType `json:"idp"`
	Aks                  struct {
		EntityType           EntityType             `json:"entity"`
		Account              *Account               `json:"account,omitempty"`
		ImpersonationContext *AuthenticationContext `json:"imp,omitempty"`
	} `json:"aks"`
}

func (*AuthenticationContext) Account

func (c *AuthenticationContext) Account() *Account

func (*AuthenticationContext) EntityType

func (c *AuthenticationContext) EntityType() EntityType

func (*AuthenticationContext) ImpersonationContext

func (c *AuthenticationContext) ImpersonationContext() *AuthenticationContext

func (*AuthenticationContext) IsAdminEntity

func (c *AuthenticationContext) IsAdminEntity() bool

func (*AuthenticationContext) IsBrandAccount

func (c *AuthenticationContext) IsBrandAccount() bool

func (*AuthenticationContext) IsFromAdminIdentityProvider

func (c *AuthenticationContext) IsFromAdminIdentityProvider() bool

func (*AuthenticationContext) IsFromGuestIdentityProvider

func (c *AuthenticationContext) IsFromGuestIdentityProvider() bool

func (*AuthenticationContext) IsFromImpersonationIdentityProvider

func (c *AuthenticationContext) IsFromImpersonationIdentityProvider() bool

func (*AuthenticationContext) IsFromMachineIdentityProvider

func (c *AuthenticationContext) IsFromMachineIdentityProvider() bool

func (*AuthenticationContext) IsFromUserIdentityProvider

func (c *AuthenticationContext) IsFromUserIdentityProvider() bool

func (*AuthenticationContext) IsGuestEntity

func (c *AuthenticationContext) IsGuestEntity() bool

func (*AuthenticationContext) IsImpersonation

func (c *AuthenticationContext) IsImpersonation() bool

func (*AuthenticationContext) IsMachineEntity

func (c *AuthenticationContext) IsMachineEntity() bool

func (*AuthenticationContext) IsRetailerAccount

func (c *AuthenticationContext) IsRetailerAccount() bool

func (*AuthenticationContext) IsUserEntity

func (c *AuthenticationContext) IsUserEntity() bool

type EntityType

type EntityType int
const (
	UnknownEntity EntityType = iota
	GuestEntity
	UserEntity
	AdminEntity
	MachineEntity
)

func (EntityType) String

func (e EntityType) String() string

func (*EntityType) UnmarshalJSON

func (e *EntityType) UnmarshalJSON(data []byte) error

type IdentityProviderType

type IdentityProviderType int
const (
	UnknownIdentityProvider IdentityProviderType = iota
	GuestIdentityProvider
	UserIdentityProvider
	AdminIdentityProvider
	MachineIdentityProvider
	ImpersonationIdentityProvider
)

func (IdentityProviderType) String

func (i IdentityProviderType) String() string

func (*IdentityProviderType) UnmarshalJSON

func (i *IdentityProviderType) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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