feat: add resolver to validate browser session

This commit is contained in:
Lakhan Samani
2023-07-12 22:12:17 +05:30
parent 07f71e883b
commit 6fa0ad1809
7 changed files with 408 additions and 1 deletions

View File

@@ -120,7 +120,6 @@ type Env struct {
AdminCookieSecure bool `json:"ADMIN_COOKIE_SECURE"`
DefaultAuthorizeResponseType *string `json:"DEFAULT_AUTHORIZE_RESPONSE_TYPE"`
DefaultAuthorizeResponseMode *string `json:"DEFAULT_AUTHORIZE_RESPONSE_MODE"`
SmsCodeExpiryTime *string `json:"SMS_CODE_EXPIRY_TIME"`
}
type Error struct {
@@ -456,6 +455,15 @@ type ValidateJWTTokenResponse struct {
Claims map[string]interface{} `json:"claims"`
}
type ValidateSessionInput struct {
Cookie string `json:"cookie"`
Roles []string `json:"roles"`
}
type ValidateSessionResponse struct {
IsValid bool `json:"is_valid"`
}
type VerificationRequest struct {
ID string `json:"id"`
Identifier *string `json:"identifier"`