federated

package
v2.10.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: BSD-3-Clause Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FederatedCredentialMatchExact = "exact"
	FederatedCredentialMatchGlob  = "glob"
)

Variables

This section is empty.

Functions

func RegisterFederatedCredentials

func RegisterFederatedCredentials(api huma.API, federatedCredentialService *FederatedCredentialService)

RegisterFederatedCredentials registers federated credential management routes.

func RegisterFederatedTokenExchange

func RegisterFederatedTokenExchange(g *echo.Group, federatedCredentialService *FederatedCredentialService)

RegisterFederatedTokenExchange registers the public RFC 8693 token exchange endpoint. It intentionally uses Echo because the standard requires form encoding while the rest of Arcane's Huma API is JSON-first.

Types

type CreateFederatedCredentialInput

type CreateFederatedCredentialInput struct {
	Body federatedtypes.CreateFederatedCredential
}

type DeleteFederatedCredentialInput

type DeleteFederatedCredentialInput struct {
	ID string `path:"id" doc:"Federated credential ID"`
}

type FederatedCredential added in v2.8.1

type FederatedCredential struct {
	database.BaseModel

	Name            string                   `json:"name" gorm:"column:name;not null" sortable:"true"`
	Description     *string                  `json:"description,omitempty" gorm:"column:description"`
	Enabled         bool                     `json:"enabled" gorm:"column:enabled;not null;default:false;index" sortable:"true"`
	IssuerURL       string                   `json:"issuerUrl" gorm:"column:issuer_url;not null;index" sortable:"true"`
	Audiences       database.StringSlice     `json:"audiences" gorm:"column:audiences;type:text;not null"`
	SubjectClaim    string                   `json:"subjectClaim" gorm:"column:subject_claim;not null;default:'sub'"`
	SubjectMatch    string                   `json:"subjectMatch" gorm:"column:subject_match;not null"`
	MatchType       string                   `json:"matchType" gorm:"column:match_type;not null;default:'exact'"`
	RoleID          string                   `json:"roleId" gorm:"column:role_id;not null;index"`
	EnvironmentID   *string                  `json:"environmentId,omitempty" gorm:"column:environment_id;index"`
	IdentityUserID  string                   `json:"identityUserId" gorm:"column:identity_user_id;not null;index"`
	TokenTTLSeconds int                      `json:"tokenTtlSeconds" gorm:"column:token_ttl_seconds;not null;default:900"`
	LastUsedAt      *time.Time               `json:"lastUsedAt,omitempty" gorm:"column:last_used_at" sortable:"true"`
	ExpiresAt       *time.Time               `json:"expiresAt,omitempty" gorm:"column:expires_at" sortable:"true"`
	IdentityUser    *common.User             `json:"identityUser,omitempty" gorm:"foreignKey:IdentityUserID;constraint:OnDelete:CASCADE"`
	Role            *role.Role               `json:"role,omitempty" gorm:"foreignKey:RoleID;constraint:OnDelete:RESTRICT"`
	Environment     *environment.Environment `json:"environment,omitempty" gorm:"foreignKey:EnvironmentID;constraint:OnDelete:SET NULL"`
}

func (FederatedCredential) TableName added in v2.8.1

func (FederatedCredential) TableName() string

type FederatedCredentialHandler

type FederatedCredentialHandler struct {
	// contains filtered or unexported fields
}

FederatedCredentialHandler provides Huma-based federated credential management endpoints.

func (*FederatedCredentialHandler) CreateFederatedCredential

func (*FederatedCredentialHandler) DeleteFederatedCredential

func (*FederatedCredentialHandler) GetFederatedCredential

func (*FederatedCredentialHandler) ListFederatedCredentials

func (*FederatedCredentialHandler) UpdateFederatedCredential

type FederatedCredentialService

type FederatedCredentialService struct {
	// contains filtered or unexported fields
}

func NewFederatedCredentialService

func NewFederatedCredentialService(
	db *database.DB,
	authService *auth.AuthService,
	userService *user.UserService,
	settingsService *settings.SettingsService,
	eventService *event.EventService,
	httpClient *http.Client,
	keySetManager *oidcjwk.KeySetManager,
) *FederatedCredentialService

func (*FederatedCredentialService) Create

func (*FederatedCredentialService) Delete

func (*FederatedCredentialService) Get

func (*FederatedCredentialService) List

func (*FederatedCredentialService) Update

func (*FederatedCredentialService) WithRoleService

func (s *FederatedCredentialService) WithRoleService(roleService *role.RoleService) *FederatedCredentialService

type FederatedTokenReplay added in v2.8.1

type FederatedTokenReplay struct {
	database.BaseModel

	TokenHash string    `json:"-" gorm:"column:token_hash;not null;uniqueIndex"`
	IssuerURL string    `json:"issuerUrl" gorm:"column:issuer_url;not null;index"`
	ExpiresAt time.Time `json:"expiresAt" gorm:"column:expires_at;not null;index"`
}

func (FederatedTokenReplay) TableName added in v2.8.1

func (FederatedTokenReplay) TableName() string

type GetFederatedCredentialInput

type GetFederatedCredentialInput struct {
	ID string `path:"id" doc:"Federated credential ID"`
}

type ListFederatedCredentialsInput

type ListFederatedCredentialsInput struct {
	Search string `query:"search" doc:"Search query for filtering by name, issuer, or subject"`
	Sort   string `query:"sort" doc:"Column to sort by"`
	Order  string `query:"order" default:"asc" doc:"Sort direction (asc or desc)"`
	Start  int    `query:"start" default:"0" doc:"Start index for pagination"`
	Limit  int    `query:"limit" default:"20" doc:"Number of items per page"`
}

type UpdateFederatedCredentialInput

type UpdateFederatedCredentialInput struct {
	ID   string `path:"id" doc:"Federated credential ID"`
	Body federatedtypes.UpdateFederatedCredential
}

Jump to

Keyboard shortcuts

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