-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
reject_request.go
60 lines (48 loc) · 1.59 KB
/
reject_request.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// RejectRequest The request payload used to accept a login or consent request.
//
// swagger:model rejectRequest
type RejectRequest struct {
// The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`).
//
// Defaults to `request_denied`.
Error string `json:"error,omitempty"`
// Debug contains information to help resolve the problem as a developer. Usually not exposed
// to the public but only in the server logs.
ErrorDebug string `json:"error_debug,omitempty"`
// Description of the error in a human readable format.
ErrorDescription string `json:"error_description,omitempty"`
// Hint to help resolve the error.
ErrorHint string `json:"error_hint,omitempty"`
// Represents the HTTP status code of the error (e.g. 401 or 403)
//
// Defaults to 400
StatusCode int64 `json:"status_code,omitempty"`
}
// Validate validates this reject request
func (m *RejectRequest) Validate(formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *RejectRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *RejectRequest) UnmarshalBinary(b []byte) error {
var res RejectRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}