Documentation
¶
Index ¶
- func OgenErrorHandler(_ context.Context, w http.ResponseWriter, _ *http.Request, err error)
- func WithRequestHostMiddleware(next http.Handler) http.Handler
- func WithScopeContext(ctx context.Context, scopeCtx ScopeContext) context.Context
- type Handler
- func (h Handler) CreateAuthAttempt(ctx context.Context, req *api.CreateAuthAttemptRequest) (api.CreateAuthAttemptRes, error)
- func (h *Handler) CreateFlow(ctx context.Context, req *api.CreateFlowRequest) (api.CreateFlowRes, error)
- func (h Handler) CreateFlowDefinition(ctx context.Context, req *api.CreateFlowDefinitionRequest) (api.CreateFlowDefinitionRes, error)
- func (h Handler) CreateHandoff(ctx context.Context, params api.CreateHandoffParams) (api.CreateHandoffRes, error)
- func (h *Handler) CreateProject(ctx context.Context, req *api.CreateProjectRequest) (api.CreateProjectRes, error)
- func (h *Handler) CreateSchema(ctx context.Context, req api.CreateSchemaReq, params api.CreateSchemaParams) (api.CreateSchemaRes, error)
- func (h Handler) CreateSession(ctx context.Context, req *api.CreateSessionRequest) (api.CreateSessionRes, error)
- func (h *Handler) CreateTeam(ctx context.Context, req *api.CreateTeamRequest, params api.CreateTeamParams) (r api.CreateTeamRes, _ error)
- func (h *Handler) CreateUser(ctx context.Context, req *api.User, params api.CreateUserParams) (api.CreateUserRes, error)
- func (h Handler) ExchangeHandoff(ctx context.Context, req *api.ExchangeRequest, ...) (api.ExchangeHandoffRes, error)
- func (h Handler) GetAuthAttempt(ctx context.Context, params api.GetAuthAttemptParams) (api.GetAuthAttemptRes, error)
- func (h *Handler) GetFlowStep(ctx context.Context, params api.GetFlowStepParams) (api.GetFlowStepRes, error)
- func (h *Handler) GetHealth(ctx context.Context) (api.GetHealthRes, error)
- func (h *Handler) GetLive(ctx context.Context) (api.GetLiveRes, error)
- func (h Handler) GetMySession(ctx context.Context, params api.GetMySessionParams) (api.GetMySessionRes, error)
- func (h *Handler) GetProject(ctx context.Context, params api.GetProjectParams) (api.GetProjectRes, error)
- func (h *Handler) GetReady(ctx context.Context) (api.GetReadyRes, error)
- func (h *Handler) GetSchemaById(ctx context.Context, params api.GetSchemaByIdParams) (api.GetSchemaByIdRes, error)
- func (h Handler) GetSession(ctx context.Context, params api.GetSessionParams) (api.GetSessionRes, error)
- func (h *Handler) GetTeam(ctx context.Context, params api.GetTeamParams) (api.GetTeamRes, error)
- func (h *Handler) GetUserByID(ctx context.Context, params api.GetUserByIDParams) (api.GetUserByIDRes, error)
- func (h Handler) IssueChallenge(ctx context.Context, req *api.IssueChallengeRequest, ...) (api.IssueChallengeRes, error)
- func (h Handler) ListSessions(ctx context.Context, params api.ListSessionsParams) (api.ListSessionsRes, error)
- func (h *Handler) NewError(ctx context.Context, err error) *api.ErrorDetailsStatusCode
- func (h Handler) RevokeMySession(ctx context.Context, params api.RevokeMySessionParams) (api.RevokeMySessionRes, error)
- func (h Handler) RevokeSession(ctx context.Context, params api.RevokeSessionParams) (api.RevokeSessionRes, error)
- func (h *Handler) SubmitFlowStep(ctx context.Context, req *api.FlowSubmitRequest, ...) (api.SubmitFlowStepRes, error)
- func (h Handler) VerifyChallengeProof(ctx context.Context, req *api.VerifyChallengeRequest, ...) (api.VerifyChallengeProofRes, error)
- type ScopeContext
- type SecurityHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OgenErrorHandler ¶
OgenErrorHandler is a custom ogen ErrorHandler that maps ogen's structural errors (decode, validate, security) into the ErrorDetails wire format so all error responses are consistent regardless of where the error originates.
func WithRequestHostMiddleware ¶
WithRequestHostMiddleware injects the effective request proto+host into the context so handlers can derive a WebAuthn RPID even when the browser omits the Origin header (same-origin fetches).
func WithScopeContext ¶
func WithScopeContext(ctx context.Context, scopeCtx ScopeContext) context.Context
Types ¶
type Handler ¶
type Handler struct {
// UnimplementedHandler is embedded to provide default "not implemented"
// responses for all endpoints, so only implemented methods need to be defined.
api.UnimplementedHandler
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler( crypto crypto.Crypter, flowService service.FlowService, authAttemptService service.AuthAttemptService, sessionService service.SessionService, projectService service.ProjectService, userService *service.UserService, schemaService *service.SchemaService, flowDefinitionService service.FlowDefinitionService, teamService *service.TeamService, ) *Handler
func (Handler) CreateAuthAttempt ¶
func (h Handler) CreateAuthAttempt(ctx context.Context, req *api.CreateAuthAttemptRequest) (api.CreateAuthAttemptRes, error)
func (*Handler) CreateFlow ¶
func (h *Handler) CreateFlow(ctx context.Context, req *api.CreateFlowRequest) (api.CreateFlowRes, error)
func (Handler) CreateFlowDefinition ¶
func (h Handler) CreateFlowDefinition(ctx context.Context, req *api.CreateFlowDefinitionRequest) (api.CreateFlowDefinitionRes, error)
func (Handler) CreateHandoff ¶
func (h Handler) CreateHandoff(ctx context.Context, params api.CreateHandoffParams) (api.CreateHandoffRes, error)
func (*Handler) CreateProject ¶
func (h *Handler) CreateProject(ctx context.Context, req *api.CreateProjectRequest) (api.CreateProjectRes, error)
func (*Handler) CreateSchema ¶
func (h *Handler) CreateSchema(ctx context.Context, req api.CreateSchemaReq, params api.CreateSchemaParams) (api.CreateSchemaRes, error)
func (Handler) CreateSession ¶
func (h Handler) CreateSession(ctx context.Context, req *api.CreateSessionRequest) (api.CreateSessionRes, error)
func (*Handler) CreateTeam ¶
func (h *Handler) CreateTeam(ctx context.Context, req *api.CreateTeamRequest, params api.CreateTeamParams) (r api.CreateTeamRes, _ error)
func (*Handler) CreateUser ¶
func (h *Handler) CreateUser(ctx context.Context, req *api.User, params api.CreateUserParams) (api.CreateUserRes, error)
func (Handler) ExchangeHandoff ¶
func (h Handler) ExchangeHandoff(ctx context.Context, req *api.ExchangeRequest, params api.ExchangeHandoffParams) (api.ExchangeHandoffRes, error)
func (Handler) GetAuthAttempt ¶
func (h Handler) GetAuthAttempt(ctx context.Context, params api.GetAuthAttemptParams) (api.GetAuthAttemptRes, error)
func (*Handler) GetFlowStep ¶
func (h *Handler) GetFlowStep(ctx context.Context, params api.GetFlowStepParams) (api.GetFlowStepRes, error)
func (Handler) GetMySession ¶
func (h Handler) GetMySession(ctx context.Context, params api.GetMySessionParams) (api.GetMySessionRes, error)
func (*Handler) GetProject ¶
func (h *Handler) GetProject(ctx context.Context, params api.GetProjectParams) (api.GetProjectRes, error)
func (*Handler) GetSchemaById ¶
func (h *Handler) GetSchemaById(ctx context.Context, params api.GetSchemaByIdParams) (api.GetSchemaByIdRes, error)
func (Handler) GetSession ¶
func (h Handler) GetSession(ctx context.Context, params api.GetSessionParams) (api.GetSessionRes, error)
func (*Handler) GetTeam ¶
func (h *Handler) GetTeam(ctx context.Context, params api.GetTeamParams) (api.GetTeamRes, error)
func (*Handler) GetUserByID ¶
func (h *Handler) GetUserByID(ctx context.Context, params api.GetUserByIDParams) (api.GetUserByIDRes, error)
func (Handler) IssueChallenge ¶
func (h Handler) IssueChallenge(ctx context.Context, req *api.IssueChallengeRequest, params api.IssueChallengeParams) (api.IssueChallengeRes, error)
func (Handler) ListSessions ¶
func (h Handler) ListSessions(ctx context.Context, params api.ListSessionsParams) (api.ListSessionsRes, error)
func (*Handler) NewError ¶
NewError implements the api.Handler interface and is used by ogen to convert any error returned by an endpoint handler into a well-formed error response. By centralizing this logic here, we can ensure that all errors are handled consistently regardless of where they originate.
func (Handler) RevokeMySession ¶
func (h Handler) RevokeMySession(ctx context.Context, params api.RevokeMySessionParams) (api.RevokeMySessionRes, error)
func (Handler) RevokeSession ¶
func (h Handler) RevokeSession(ctx context.Context, params api.RevokeSessionParams) (api.RevokeSessionRes, error)
func (*Handler) SubmitFlowStep ¶
func (h *Handler) SubmitFlowStep(ctx context.Context, req *api.FlowSubmitRequest, params api.SubmitFlowStepParams) (api.SubmitFlowStepRes, error)
func (Handler) VerifyChallengeProof ¶
func (h Handler) VerifyChallengeProof(ctx context.Context, req *api.VerifyChallengeRequest, params api.VerifyChallengeProofParams) (api.VerifyChallengeProofRes, error)
type ScopeContext ¶
type ScopeContext struct {
ProjectID string
}
func GetScopeContext ¶
func GetScopeContext(ctx context.Context) (ScopeContext, bool)
type SecurityHandler ¶
type SecurityHandler struct {
}
func NewSecurityHandler ¶
func NewSecurityHandler() *SecurityHandler
func (SecurityHandler) HandleOAuth2 ¶
func (s SecurityHandler) HandleOAuth2(ctx context.Context, operationName api.OperationName, t api.OAuth2) (context.Context, error)
func (SecurityHandler) HandleUsernamePassword ¶
func (s SecurityHandler) HandleUsernamePassword(ctx context.Context, operationName api.OperationName, t api.UsernamePassword) (context.Context, error)