Documentation
¶
Overview ¶
templ: version: v0.3.1001
templ: version: v0.3.1001
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthorizeError ¶
AuthorizeError is the page rendered when wick can't safely redirect back to the client (unknown client_id, redirect_uri mismatch). The OAuth spec requires we NOT redirect in those cases — phishing risk.
func ConnectionsPage ¶
func ConnectionsPage(data ConnectionsPageData) templ.Component
func ConsentPage ¶
func ConsentPage(data ConsentData) templ.Component
Types ¶
type ConnectionsPageData ¶
ConnectionsPageData carries every value the page needs.
JustRevoked is the client name that was disconnected on the previous request; non-empty triggers the success banner. Carried via query string so a page refresh after the redirect doesn't re-flash the banner.
type ConsentData ¶
type ConsentData struct {
User *entity.User
ClientName string
Scope string
ClientID string
RedirectURI string
State string
CodeChallenge string
CodeChallengeMethod string
}
ConsentData carries everything the consent page needs to render.
Every field except User round-trips through hidden form inputs back to POST /oauth/authorize so the consent decision binds to the same request the user just looked at.
type GrantRow ¶
type GrantRow struct {
ClientID string
ClientName string
GrantedAt time.Time
LastUsedAt *time.Time
TokenCount int
}
GrantRow is the view-layer projection of one OAuth grant. The handler flattens GrantRow into this shape so the view never has to import the oauth package (which would create a cycle through the consent page).