From 8f7dec8ba6b2f9bde01afd0a110596ebbd43e0ed Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Fri, 15 Aug 2025 19:20:48 +0100 Subject: Implement OIDC --- api/dto/auth.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 api/dto/auth.go (limited to 'api/dto/auth.go') diff --git a/api/dto/auth.go b/api/dto/auth.go new file mode 100644 index 0000000..0379f21 --- /dev/null +++ b/api/dto/auth.go @@ -0,0 +1,30 @@ +package dto + +type LoginBasicRequest struct { + Username string `json:"username" validate:"required"` + Password string `json:"password" validate:"required"` +} + +type LoginOAuthCallbackRequest struct { + Code string `json:"code" validate:"required"` + State string `json:"state" validate:"required"` +} + +type LoginOAuthOutboundResponse struct { + URL string `json:"url" validate:"required"` +} + +type LoginResponse struct { + ID int32 `json:"id"` + Username string `json:"username"` +} + +type LoginOptionsResponse struct { + Options []LoginOption `json:"options"` +} + +type LoginOption struct { + Name string `json:"name"` + Identifier string `json:"identifier"` + Type string `json:"type"` +} -- cgit v1.2.3-70-g09d2