Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticationContext ¶
type AuthenticationContext struct {
TenantID string `json:"tenantId"`
UserID string `json:"userId"`
}
AuthenticationContext is the external user struct
func GetAuthenticationContext ¶
func GetAuthenticationContext(ctx context.Context) *AuthenticationContext
GetAuthenticationContext return the authentication context inside the context
func NewAuthenticationContext ¶
func NewAuthenticationContext(tenantID, userID string) *AuthenticationContext
NewAuthenticationContext returns a pointer of authentication context
func (*AuthenticationContext) GetTenantID ¶
func (a *AuthenticationContext) GetTenantID() string
GetTenantID returns the tenant id
func (*AuthenticationContext) GetUserID ¶
func (a *AuthenticationContext) GetUserID() string
GetUserID returns the user id
func (*AuthenticationContext) SetInContext ¶
func (a *AuthenticationContext) SetInContext(ctx context.Context) context.Context
SetInContext returns a context with authentication inside
func (*AuthenticationContext) String ¶
func (a *AuthenticationContext) String() string
String returns the details of auth context
func (*AuthenticationContext) Valid ¶
func (a *AuthenticationContext) Valid() bool
Valid returns a boolean if the context is valid
type IAuthenticationContext ¶
IAuthenticationContext is the external user contract
type UserCreate ¶
Click to show internal directories.
Click to hide internal directories.