11package auth
22
33import (
4- "go.containerssh.io/libcontainerssh/metadata"
4+ "go.containerssh.io/libcontainerssh/metadata"
55)
66
77// PasswordAuthRequest is an authentication request for password authentication.
88//
99// swagger:model PasswordAuthRequest
1010type PasswordAuthRequest struct {
11+ // swagger:allOf
1112 metadata.ConnectionAuthPendingMetadata `json:",inline"`
1213
1314 // Password the user provided for authentication.
1415 //
1516 // required: true
17+ // in: body
1618 // swagger:strfmt Base64
1719 Password string `json:"passwordBase64"`
1820}
@@ -21,8 +23,11 @@ type PasswordAuthRequest struct {
2123//
2224// swagger:model PublicKeyAuthRequest
2325type PublicKeyAuthRequest struct {
26+ // swagger:allOf
2427 metadata.ConnectionAuthPendingMetadata `json:",inline"`
2528
29+ // in: body
30+ // required: true
2631 PublicKey `json:",inline"`
2732}
2833
@@ -32,14 +37,24 @@ type PublicKeyAuthRequest struct {
3237//
3338// swagger:model AuthorizationRequest
3439type AuthorizationRequest struct {
40+ // swagger:allOf
3541 metadata.ConnectionAuthenticatedMetadata `json:",inline"`
3642}
3743
3844// ResponseBody is a response to authentication requests.
3945//
4046// swagger:model AuthResponseBody
4147type ResponseBody struct {
42- metadata.ConnectionAuthenticatedMetadata `json:",inline"`
48+ metadata.DynamicMetadata `json:",inline"`
49+
50+ // AuthenticatedUsername contains the username that was actually verified. This may differ from LoginUsername when,
51+ // for example OAuth2 or Kerberos authentication is used. This field is empty until the authentication phase is
52+ // completed.
53+ //
54+ // required: false
55+ // in: body
56+ // example: systemusername
57+ AuthenticatedUsername string `json:"authenticatedUsername,omitempty"`
4358
4459 // Success indicates if the authentication was successful.
4560 //
@@ -55,5 +70,6 @@ type Response struct {
5570 // The response body
5671 //
5772 // in: body
58- ResponseBody
73+ // required: true
74+ Body ResponseBody
5975}
0 commit comments