30 lines
517 B
Go
30 lines
517 B
Go
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"`
|
|
}
|