// 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 ( "context" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // AcceptLoginRequest HandledLoginRequest is the request payload used to accept a login request. // // swagger:model acceptLoginRequest type AcceptLoginRequest struct { // ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it // to express that, for example, a user authenticated using two factor authentication. Acr string `json:"acr,omitempty"` // context Context JSONRawMessage `json:"context,omitempty"` // ForceSubjectIdentifier forces the "pairwise" user ID of the end-user that authenticated. The "pairwise" user ID refers to the // (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID // Connect specification. It allows you to set an obfuscated subject ("user") identifier that is unique to the client. // // Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the // sub claim in the OAuth 2.0 Introspection. // // Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself // you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in // ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's // configuration). // // Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies // that you have to compute this value on every authentication process (probably depending on the client ID or some // other unique value). // // If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail. ForceSubjectIdentifier string `json:"force_subject_identifier,omitempty"` // Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store // a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she // will not be asked to log in again. Remember bool `json:"remember,omitempty"` // RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the // authorization will be remembered for the duration of the browser session (using a session cookie). RememberFor int64 `json:"remember_for,omitempty"` // Subject is the user ID of the end-user that authenticated. // Required: true Subject *string `json:"subject"` } // Validate validates this accept login request func (m *AcceptLoginRequest) Validate(formats strfmt.Registry) error { var res []error if err := m.validateSubject(formats); err != nil { res = append(res, err) } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } func (m *AcceptLoginRequest) validateSubject(formats strfmt.Registry) error { if err := validate.Required("subject", "body", m.Subject); err != nil { return err } return nil } // ContextValidate validates this accept login request based on context it is used func (m *AcceptLoginRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation func (m *AcceptLoginRequest) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } return swag.WriteJSON(m) } // UnmarshalBinary interface implementation func (m *AcceptLoginRequest) UnmarshalBinary(b []byte) error { var res AcceptLoginRequest if err := swag.ReadJSON(b, &res); err != nil { return err } *m = res return nil }