payload

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationPayload

type AuthenticationPayload struct {
	http.Payload `json:"-"`
	// The User IP address as seen by RP. String, IPv4 and IPv6 is allowed.
	EndUserIP string `validate:"ip" json:"endUserIp"`
	// Requirements on how the auth or sign order must be performed.
	Requirement *Requirement `json:"requirement,omitempty"`
	// The text to be displayed during authentication. The value must be base 64-encoded.
	// The text can be formatted using CR, LF and CRLF for new lines.
	// 1-1 500 characters after base 64 encoding.
	UserVisibleData UserDataString `validate:"omitempty,base64Length=1500" json:"userVisibleData,omitempty"`
	// Data is not displayed to the user. The value must be base 64-encoded.
	// 1-1 500 characters after base 64-encoding.
	UserNonVisibleData UserDataString `validate:"omitempty,base64Length=1500" json:"userNonVisibleData,omitempty"`
	// This parameter indicates that userVisibleData holds formatting characters.
	UserVisibleDataFormat string `validate:"omitempty,eq=simpleMarkdownV1" json:"userVisibleDataFormat,omitempty"`
}

AuthenticationPayload holds the required and optional fields of the authentication request.

type CancelPayload

type CancelPayload struct {
	http.Payload `json:"-"`
	// The orderRef from the response from authentication or sign.
	OrderRef string `json:"orderRef"`
}

CancelPayload holds the required fields of the collect Payload.

type CollectPayload

type CollectPayload struct {
	http.Payload `json:"-"`
	// The orderRef from the response from authentication or sign.
	OrderRef string `json:"orderRef"`
}

CollectPayload holds the required fields of the collect Payload.

type PhoneAuthenticationPayload

type PhoneAuthenticationPayload struct {
	http.Payload `json:"-"`
	// A personal identification number to be used to complete the transaction.
	PersonalNumber string `validate:"omitempty,numeric,len=12" json:"personalNumber,omitempty"`
	// Indicate if the user or the RP initiated the phone call.
	CallInitiator string `validate:"oneof=user RP" json:"callInitiator"`
	// Requirements on how the auth or sign order must be performed.
	Requirement *PhoneRequirement `json:"requirement,omitempty"`
	// The text to be displayed during authentication. The value must be base 64-encoded.
	// The text can be formatted using CR, LF and CRLF for new lines.
	// 1-1 500 characters after base 64 encoding.
	UserVisibleData UserDataString `validate:"omitempty,base64Length=1500" json:"userVisibleData,omitempty"`
	// Data is not displayed to the user. The value must be base 64-encoded.
	// 1-1 500 characters after base 64-encoding.
	UserNonVisibleData UserDataString `validate:"omitempty,base64Length=1500" json:"userNonVisibleData,omitempty"`
	// This parameter indicates that userVisibleData holds formatting characters.
	UserVisibleDataFormat string `validate:"omitempty,eq=simpleMarkdownV1" json:"userVisibleDataFormat,omitempty"`
}

PhoneAuthenticationPayload holds the required and optional fields of the phone authentication request.

type PhoneRequirement

type PhoneRequirement struct {
	CardReader          string `validate:"omitempty,len=10" json:"cardReader,omitempty"`
	CertificatePolicies string `validate:"omitempty,len=10" json:"certificatePolicies,omitempty"`
	// If true, users are required to sign the transaction with their PIN code.
	PinCode bool `json:"pinCode,omitempty"`
}

PhoneRequirement holds the required and optional fields of the Requirement payload.

type PhoneSignPayload

type PhoneSignPayload struct {
	http.Payload `json:"-"`
	// A personal identification number to be used to complete the transaction.
	PersonalNumber string `validate:"omitempty,numeric,len=12" json:"personalNumber,omitempty"`
	// Indicate if the user or the RP initiated the phone call.
	CallInitiator string `validate:"oneof=user RP" json:"callInitiator"`
	// Requirements on how the auth or sign order must be performed.
	Requirement *PhoneRequirement `json:"requirement,omitempty"`
	// The text to be displayed and signed. The text can be formatted using CR, LF and CRLF for new lines.
	// 1--40 000 characters after base 64 encoding.
	UserVisibleData UserDataString `validate:"required,base64Length=40000" json:"userVisibleData"`
	// Data not displayed for the User.
	// 1-200 000 characters after base 64-encoding.
	UserNonVisibleData UserDataString `validate:"omitempty,base64Length=200000" json:"userNonVisibleData,omitempty"`
	// This parameter indicates that userVisibleData holds formatting characters.
	UserVisibleDataFormat string `validate:"omitempty,eq=simpleMarkdownV1" json:"userVisibleDataFormat,omitempty"`
}

PhoneSignPayload holds the required and optional fields for the phone sign payload.

type Requirement

type Requirement struct {
	CardReader          string `validate:"omitempty,len=10" json:"cardReader,omitempty"`
	CertificatePolicies string `validate:"omitempty,len=10" json:"certificatePolicies,omitempty"`
	// A personal identification number to be used to complete the transaction.
	PersonalNumber string `validate:"omitempty,numeric,len=12" json:"personalNumber,omitempty"`
	// If true. the client needs to provide MRTD (Machine readable travel document) information to
	// complete the order.
	Mrtd bool `json:"mrtd,omitempty"`
	// If true, users are required to sign the transaction with their PIN code.
	PinCode bool `json:"pinCode,omitempty"`
}

Requirement holds the required and optional fields of the Requirement payload.

type SignPayload

type SignPayload struct {
	http.Payload `json:"-"`
	// The User IP address as seen by RP. String, IPv4 and IPv6 is allowed.
	EndUserIP string `validate:"ip" json:"endUserIp"`
	// Requirements on how the auth or sign order must be performed.
	Requirement *Requirement `json:"requirement,omitempty"`
	// The text to be displayed and signed. The text can be formatted using CR, LF and CRLF for new lines.
	// 1--40 000 characters after base 64 encoding.
	UserVisibleData UserDataString `validate:"required,base64Length=40000" json:"userVisibleData"`
	// Data not displayed for the User.
	// 1-200 000 characters after base 64-encoding.
	UserNonVisibleData UserDataString `validate:"omitempty,base64Length=200000" json:"userNonVisibleData,omitempty"`
	// This parameter indicates that userVisibleData holds formatting characters.
	UserVisibleDataFormat string `validate:"omitempty,eq=simpleMarkdownV1" json:"userVisibleDataFormat,omitempty"`
}

SignPayload holds the required and optional fields for the sign payload.

type UserDataString

type UserDataString string

UserDataString holds the user data.

func (UserDataString) MarshalJSON

func (u UserDataString) MarshalJSON() ([]byte, error)

MarshalJSON marshals the type into JSON.

func (*UserDataString) UnmarshalJSON

func (u *UserDataString) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshal a JSON into a UserDataString.

Jump to

Keyboard shortcuts

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