auth

package
v1.0.0-beta.68 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	GotrueAudHeaderKey = "X-JWT-AUD"
	ClientIdPrefix     = "tid_"
	ClientSecretPrefix = "tsec_"

	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"`
	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 DeleteInvitationsPayload

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

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