Documentation
¶
Index ¶
- func DeviceCodeEntryPage(data CodeEntryPageData) g.Node
- func DeviceSuccessPage(approved bool, branding BrandingConfig) g.Node
- func DeviceVerificationPage(data VerificationPageData) g.Node
- func OAuthConsentPage(data ConsentPageData) g.Node
- type BrandingConfig
- type CodeEntryPageData
- type ConsentPageData
- type ScopeInfo
- type VerificationPageData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeviceCodeEntryPage ¶
func DeviceCodeEntryPage(data CodeEntryPageData) g.Node
DeviceCodeEntryPage renders the device code entry page using ForgeUI.
func DeviceSuccessPage ¶
func DeviceSuccessPage(approved bool, branding BrandingConfig) g.Node
DeviceSuccessPage renders the authorization success/denial page using ForgeUI.
func DeviceVerificationPage ¶
func DeviceVerificationPage(data VerificationPageData) g.Node
DeviceVerificationPage renders the device verification and consent page using ForgeUI.
func OAuthConsentPage ¶
func OAuthConsentPage(data ConsentPageData) g.Node
OAuthConsentPage renders the OAuth consent page using ForgeUI.
Types ¶
type BrandingConfig ¶
type BrandingConfig struct {
PrimaryColor string // Main brand color (e.g., "#4F46E5")
BackgroundColor string // Page background color (e.g., "#F9FAFB")
CardBackground string // Card background color (e.g., "#FFFFFF")
TextColor string // Primary text color (e.g., "#111827")
AppName string // Display name (e.g., "Acme Inc")
}
BrandingConfig contains branding configuration for consent pages.
func DefaultBranding ¶
func DefaultBranding() BrandingConfig
DefaultBranding returns the default branding configuration.
func ExtractBranding ¶
func ExtractBranding(client *schema.OAuthClient, app *schema.App) BrandingConfig
ExtractBranding extracts branding configuration from OAuth client or app metadata Priority: 1. Client metadata, 2. App metadata, 3. Defaults.
type CodeEntryPageData ¶
type CodeEntryPageData struct {
UserCode string
ErrorMsg string
Branding BrandingConfig
BasePath string // Base path for URLs (e.g., "/oauth2")
RedirectURL string // Optional redirect URL after authorization
}
CodeEntryPageData contains data for the device code entry page.
type ConsentPageData ¶
type ConsentPageData struct {
ClientName string
ClientID string
LogoURI string
Scopes []ScopeInfo
RedirectURI string
ResponseType string
State string
CodeChallenge string
CodeChallengeMethod string
Nonce string
Branding BrandingConfig
}
ConsentPageData contains all data needed for the consent page.
type VerificationPageData ¶
type VerificationPageData struct {
UserCode string // Normalized code (stored in DB, used in form field)
UserCodeFormatted string // Formatted code (displayed to user)
ClientName string
LogoURI string
Scopes []ScopeInfo
Branding BrandingConfig
BasePath string // Base path for URLs (e.g., "/oauth2")
RedirectURL string // Optional redirect URL after authorization
}
VerificationPageData contains data for the device verification/consent page.