Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Subject ¶
type Subject struct {
Type SubjectType `json:"type"`
UserID string `json:"user_id"`
Email string `json:"email,omitempty"`
}
Subject represents an authenticated subject (user or system)
func GetSubjects ¶
GetSubjects retrieves all Subjects from context Returns a copy of the slice containing all authenticated subjects If no subjects found, returns empty slice (non-nil) The returned slice is a copy to ensure immutability
func NewSubjectFromGoogleID ¶
NewSubjectFromGoogleID creates Subject from Google ID token claims
func NewSubjectFromIAP ¶
NewSubjectFromIAP creates Subject from IAP JWT claims
func NewSubjectFromSlackUser ¶
NewSubjectFromSlackUser creates Subject from Slack user information Returns error if userID is empty
type SubjectType ¶
type SubjectType string
SubjectType represents the type of authentication source
const ( SubjectTypeIAP SubjectType = "iap" SubjectTypeGoogleID SubjectType = "google_id" SubjectTypeSlack SubjectType = "slack" )
Click to show internal directories.
Click to hide internal directories.