Documentation
¶
Index ¶
- Constants
- type Client
- func (client *Client) CreateShareURL(scenario *dynamic.Scenario) (share dynamic.ShareURL, err error)
- func (client *Client) GetActivityDetails(token string) (activity profile.ActivityDetails, err error)
- func (client *Client) GetSdkID() string
- func (client *Client) OverrideAPIURL(apiURL string)
- func (client *Client) PerformAmlCheck(profile aml.Profile) (result aml.Result, err error)
- type DigitalIdentityClient
- func (client *DigitalIdentityClient) CreateShareQrCode(sessionID string) (share *digitalidentity.QrCode, err error)
- func (client *DigitalIdentityClient) CreateShareSession(shareSessionRequest *digitalidentity.ShareSessionRequest) (shareSession *digitalidentity.ShareSession, err error)
- func (client *DigitalIdentityClient) GetQrCode(qrCodeId string) (share digitalidentity.ShareSessionQrCode, err error)
- func (client *DigitalIdentityClient) GetSdkID() string
- func (client *DigitalIdentityClient) GetShareReceipt(receiptId string) (share digitalidentity.SharedReceiptResponse, err error)
- func (client *DigitalIdentityClient) GetShareSession(sessionID string) (*digitalidentity.ShareSession, error)
- func (client *DigitalIdentityClient) OverrideAPIURL(apiURL string)
Constants ¶
const DefaultURL = "https://api.yoti.com/share"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // SdkID represents the SDK ID and NOT the App ID. This can be found in the integration section of your // application hub at https://hub.yoti.com/ SdkID string // Key should be the security key given to you by yoti (see: security keys section of // https://hub.yoti.com) for more information about how to load your key from a file see: // https://github.com/getyoti/yoti-go-sdk/blob/master/README.md Key *rsa.PrivateKey HTTPClient requests.HttpClient // Mockable HTTP Client Interface // contains filtered or unexported fields }
Client represents a client that can communicate with yoti and return information about Yoti users.
func (*Client) CreateShareURL ¶
func (client *Client) CreateShareURL(scenario *dynamic.Scenario) (share dynamic.ShareURL, err error)
CreateShareURL creates a QR code for a specified dynamic scenario
func (*Client) GetActivityDetails ¶
func (client *Client) GetActivityDetails(token string) (activity profile.ActivityDetails, err error)
GetActivityDetails requests information about a Yoti user using the one time use token generated by the Yoti login process. It returns the outcome of the request. If the request was successful it will include the user's details, otherwise an error will be returned, which will specify the reason the request failed. If the function call can be reattempted with the same token the error will implement interface{ Temporary() bool }.
func (*Client) OverrideAPIURL ¶
OverrideAPIURL overrides the default API URL for this Yoti Client
type DigitalIdentityClient ¶ added in v3.12.0
type DigitalIdentityClient struct { // SdkID represents the SDK ID and NOT the App ID. This can be found in the integration section of your // application hub at https://hub.yoti.com/ SdkID string // Key should be the security key given to you by yoti (see: security keys section of // https://hub.yoti.com) for more information about how to load your key from a file see: // https://github.com/getyoti/yoti-go-sdk/blob/master/README.md Key *rsa.PrivateKey HTTPClient requests.HttpClient // Mockable HTTP Client Interface // contains filtered or unexported fields }
DigitalIdentityClient represents a client that can communicate with yoti and return information about Yoti users.
func NewDigitalIdentityClient ¶ added in v3.12.0
func NewDigitalIdentityClient(sdkID string, key []byte) (*DigitalIdentityClient, error)
NewDigitalIdentityClient constructs a Client object
func (*DigitalIdentityClient) CreateShareQrCode ¶ added in v3.12.0
func (client *DigitalIdentityClient) CreateShareQrCode(sessionID string) (share *digitalidentity.QrCode, err error)
CreateShareQrCode generates a sharing session QR code to initiate a sharing process based on session ID
func (*DigitalIdentityClient) CreateShareSession ¶ added in v3.12.0
func (client *DigitalIdentityClient) CreateShareSession(shareSessionRequest *digitalidentity.ShareSessionRequest) (shareSession *digitalidentity.ShareSession, err error)
CreateShareSession creates a sharing session to initiate a sharing process based on a policy
func (*DigitalIdentityClient) GetQrCode ¶ added in v3.12.0
func (client *DigitalIdentityClient) GetQrCode(qrCodeId string) (share digitalidentity.ShareSessionQrCode, err error)
Get session QR code based on generated Qr ID
func (*DigitalIdentityClient) GetSdkID ¶ added in v3.12.0
func (client *DigitalIdentityClient) GetSdkID() string
GetSdkID gets the Client SDK ID attached to this client instance
func (*DigitalIdentityClient) GetShareReceipt ¶ added in v3.12.0
func (client *DigitalIdentityClient) GetShareReceipt(receiptId string) (share digitalidentity.SharedReceiptResponse, err error)
GetShareReceipt fetches the receipt of the share given a receipt id.
func (*DigitalIdentityClient) GetShareSession ¶ added in v3.12.0
func (client *DigitalIdentityClient) GetShareSession(sessionID string) (*digitalidentity.ShareSession, error)
GetShareSession retrieves the sharing session.
func (*DigitalIdentityClient) OverrideAPIURL ¶ added in v3.12.0
func (client *DigitalIdentityClient) OverrideAPIURL(apiURL string)
OverrideAPIURL overrides the default API URL for this Yoti Client