auth/models.go

30 lines
517 B
Go
Raw Normal View History

2023-10-21 08:26:15 +00:00
package auth
// Request/response
type InfoResponse struct {
Version string `json:"version"`
}
type ErrorResponse struct {
Status int `json:"status"`
Message string `json:"message"`
}
type PubkeyResponse struct {
PubKey []byte `json:"publicKey"`
}
type TokenRequest struct {
Password string `json:"password"`
}
type TokenResponse struct {
Token string `json:"token"`
}
// Messages
type MsgTokenIssued struct {
Message string `json:"message"`
ID string `json:"jti"`
Subject string `json:"sub"`
}