auth

package
v1.0.0-beta.79 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GotrueAudHeaderKey = "X-JWT-AUD"
	ClientIdPrefix     = "tid_"
	ClientSecretPrefix = "tsec_"
	Component          = "component"
	AppKey             = "app_key"
	AppKeyUser         = "app key"

	InvitationStatusPending  = "PENDING"
	InvitationStatusAccepted = "ACCEPTED"
	InvitationStatusExpired  = "EXPIRED"
)

Variables

View Source
var InvalidInvitationCodeErr = errors.Unauthenticated("Failed to verify invitation code")

Functions

func GetCurrentSub

func GetCurrentSub(ctx context.Context) (string, error)

Types

type CreateInvitationPayload

type CreateInvitationPayload struct {
	Email string `json:"email"`
	Role  string `json:"role"`

	TigrisNamespace     string `json:"tigris_namespace"`
	TigrisNamespaceName string `json:"tigris_namespace_name"`

	CreatedBy      string `json:"created_by"`
	CreatedByName  string `json:"created_by_name"`
	ExpirationTime int64  `json:"expiration_time"`
}

type CreateUserPayload

type CreateUserPayload struct {
	Email    string      `json:"email"`
	Password string      `json:"password"`
	AppData  UserAppData `json:"app_data"`
}

type DefaultUsersManager

type DefaultUsersManager struct {
	Management    *management.Management
	TenantManager *metadata.TenantManager
}

func NewDefaultUsersManager

func NewDefaultUsersManager(tm *metadata.TenantManager) *DefaultUsersManager

func (*DefaultUsersManager) CreateInvitations

func (*DefaultUsersManager) DeleteInvitations

func (*DefaultUsersManager) ListInvitations

func (*DefaultUsersManager) ListUsers

func (*DefaultUsersManager) VerifyInvitation

type DeleteInvitationsPayload

type DeleteInvitationsPayload struct {
	Email           string `json:"email"`
	CreatedBy       string `json:"created_by"`
	TigrisNamespace string `json:"tigris_namespace"`
	Status          string `json:"status"`
}

type Provider

func NewProvider

func NewProvider(userstore *metadata.UserSubspace, txMgr *transaction.Manager) Provider

type UserAppData

type UserAppData struct {
	CreatedAt       int64  `json:"created_at"`
	CreatedBy       string `json:"created_by"`
	UpdatedAt       int64  `json:"updated_at"`
	UpdatedBy       string `json:"updated_by"`
	TigrisNamespace string `json:"tigris_namespace"`
	Name            string `json:"name"`
	Description     string `json:"description"`
	Project         string `json:"tigris_project"`
}

type VerifyInvitationPayload

type VerifyInvitationPayload struct {
	Email string `json:"email"`
	Code  string `json:"code"`
}

Jump to

Keyboard shortcuts

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