Files
isp-admin-service/entity/sudir.go
T
txix c1bb2cf4ed
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
2026-03-23 17:08:40: merge [main:2d7adad8000642a271d9ea575fab87f8373d2e5d];
2026-03-23 17:08:40 +03:00

40 lines
974 B
Go

package entity
import (
"fmt"
)
// nolint:tagliatelle,godoclint
type SudirAuthError struct {
ErrorName string `json:"error"`
ErrorDescription string `json:"error_description"`
}
func (s *SudirAuthError) Error() string {
return fmt.Sprintf("error: %s; description: %s", s.ErrorName, s.ErrorDescription)
}
// nolint:tagliatelle,errname,godoclint
type SudirUserResponse struct {
*SudirAuthError
Email string `json:"email"`
Groups []string `json:"groups"`
Sub string `json:"sub"`
GivenName string `json:"given_name"`
FamilyName string `json:"family_name"`
Name string `json:"name"`
}
// nolint:tagliatelle,errname,godoclint
type SudirTokenResponse struct {
*SudirAuthError
IdToken string `json:"id_token"`
AccessToken string `json:"access_token"`
ExpiresIn int `json:"expires_in"`
Scope string `json:"scope"`
RefreshToken string `json:"refresh_token"`
TokenType string `json:"token_type"`
}