mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Move AuthenticateUserRequest and AuthenticateUserResponse to types.go
This commit is contained in:
parent
5664faf2dd
commit
5d723af9fd
@ -66,15 +66,6 @@ func GetNewAuthenticationToken() (string, error) {
|
||||
return respBody.Jwt, nil
|
||||
}
|
||||
|
||||
type AuthenticateUserRequest struct {
|
||||
Username string
|
||||
Password string
|
||||
}
|
||||
|
||||
type AuthenticateUserResponse struct {
|
||||
Jwt string
|
||||
}
|
||||
|
||||
func AddAuthorizationHeader(request *http.Request) error {
|
||||
token, err := GetAuthenticationToken()
|
||||
if err != nil {
|
||||
|
@ -72,3 +72,12 @@ type GenericError struct {
|
||||
func (e *GenericError) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.Err, e.Details)
|
||||
}
|
||||
|
||||
type AuthenticateUserRequest struct {
|
||||
Username string
|
||||
Password string
|
||||
}
|
||||
|
||||
type AuthenticateUserResponse struct {
|
||||
Jwt string
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user