models

package
v0.0.0-...-6c3212e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginRequest

type LoginRequest struct {

	// The password to log in with
	Password string `json:"password,omitempty"`

	// A ED25519 public key in hex encoded format that will be placed in the JWT and used to verify the signature
	PublicKey string `json:"public_key,omitempty"`

	// A signature made using the ED25519 private key of the time:user:pass string
	Signature string `json:"signature,omitempty"`

	// A string holding the numeric unix timestamp
	Timestamp string `json:"timestamp,omitempty"`

	// The username to log in with
	Username string `json:"username,omitempty"`
}

LoginRequest login request

swagger:model LoginRequest

func (*LoginRequest) ContextValidate

func (m *LoginRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this login request based on context it is used

func (*LoginRequest) MarshalBinary

func (m *LoginRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoginRequest) UnmarshalBinary

func (m *LoginRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoginRequest) Validate

func (m *LoginRequest) Validate(formats strfmt.Registry) error

Validate validates this login request

type LoginResponse

type LoginResponse struct {

	// An error message indicating why login failed
	Error string `json:"error,omitempty"`

	// The JWT token identifying the user, obtained from /login
	Token string `json:"token,omitempty"`

	// Details to assist tests
	Detail string `json:"-"`
}

LoginResponse login response

swagger:model LoginResponse

func (*LoginResponse) ContextValidate

func (m *LoginResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this login response based on context it is used

func (*LoginResponse) MarshalBinary

func (m *LoginResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoginResponse) UnmarshalBinary

func (m *LoginResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoginResponse) Validate

func (m *LoginResponse) Validate(formats strfmt.Registry) error

Validate validates this login response

type SignRequest

type SignRequest struct {

	// base64 encoded Choria protocol.Request message to sign
	// Format: byte
	Request strfmt.Base64 `json:"request,omitempty"`

	// A signature, hex encoded, made using the private key matching the public key in the token
	Signature string `json:"signature,omitempty"`

	// The JWT token identifying the user, obtained from /login
	Token string `json:"token,omitempty"`
}

SignRequest sign request

swagger:model SignRequest

func (*SignRequest) ContextValidate

func (m *SignRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this sign request based on context it is used

func (*SignRequest) MarshalBinary

func (m *SignRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SignRequest) UnmarshalBinary

func (m *SignRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SignRequest) Validate

func (m *SignRequest) Validate(formats strfmt.Registry) error

Validate validates this sign request

type SignResponse

type SignResponse struct {

	// An error message indicating why signing failed
	Error string `json:"error,omitempty"`

	// base64 encoded protocol.SecureRequest signed message
	// Format: byte
	SecureRequest strfmt.Base64 `json:"secure_request,omitempty"`

	// Details to assist tests
	Detail string `json:"-"`
}

SignResponse sign response

swagger:model SignResponse

func (*SignResponse) ContextValidate

func (m *SignResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this sign response based on context it is used

func (*SignResponse) MarshalBinary

func (m *SignResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SignResponse) UnmarshalBinary

func (m *SignResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SignResponse) Validate

func (m *SignResponse) Validate(formats strfmt.Registry) error

Validate validates this sign response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL