feat: auth handlers

This commit is contained in:
2025-09-07 16:45:20 +03:30
parent 5c5df48644
commit f4e5e074d3
11 changed files with 227 additions and 4 deletions
View File
+27
View File
@@ -0,0 +1,27 @@
package dto
type ChallengeRequest struct {
PubKey string `json:"pubKey" validate:"required,eth_pubkey"`
}
type ChallengeResponse struct {
Message string `json:"message"`
TimeStamp string `json:"timeStamp"`
ExpiresAt string `json:"expiresAt"`
}
type AuthenticateRequest struct {
PubKey string `json:"pubKey" validate:"required,eth_pubkey"`
Signature string `json:"signature" validate:"required,eth_signature"`
Message string `json:"message" validate:"required,uuid"`
}
type AuthenticateResponse struct {
AuthorizationToken string `json:"authorizationToken"`
RefreshToken string `json:"refreshToken"`
ExpiresAt int64 `json:"expiresAt"`
}
type RefreshTokenRequest struct {
RefreshToken string `json:"refreshToken" validate:"required,jwt"`
}