Documentation
¶
Overview ¶
Package callback contains reusable HTTP helpers for browser based authn callback flows. It depends only on Kernel authn contracts, not on Casdoor SDK.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
Login authn.LoginService
Logger logx.Logger
// LoginURL is optional. When it is set, a browser request to the callback
// endpoint without a code is redirected to the provider login URL instead of
// returning a raw JSON error. This makes local integration tests and real web
// app flows friendlier while keeping the provider hidden behind authn.LoginService.
LoginURL string
RedirectURI string
ExpectedState string
OrgID string
AppID string
SuccessText string
OnSuccess func(context.Context, authn.CallbackResult) error
}
Handler exchanges OAuth/OIDC callback code values through authn.LoginService. It is provider-neutral: Casdoor is only one possible implementation behind the service interface.
Click to show internal directories.
Click to hide internal directories.