clients

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package clients provides functions for invoking the APIs of the verification server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCodeStatus added in v0.4.0

func CheckCodeStatus(ctx context.Context, hostname string, apiKey, uuid string, timeout time.Duration) (*api.CheckCodeStatusRequest, *api.CheckCodeStatusResponse, error)

CheckCodeStatus uses the ADMIN API to retrieve the status of an OTP code.

func GetCertificate

func GetCertificate(ctx context.Context, hostname, apikey, token, hmac string, timeout time.Duration) (*api.VerificationCertificateRequest, *api.VerificationCertificateResponse, error)

GetCertificate exchanges a verification token + HMAC for a verification certificate.

func GetToken

func GetToken(ctx context.Context, hostname, apikey, code string, timeout time.Duration) (*api.VerifyCodeRequest, *api.VerifyCodeResponse, error)

GetToken makes the API call to exchange a code for a token.

func IssueCode

func IssueCode(ctx context.Context, hostname, apiKey string, request *api.IssueCodeRequest) (*api.IssueCodeResponse, error)

IssueCode uses the ADMIN API to issue a verification code. Currently does not accept the SMS param.

func RunEndToEnd added in v0.7.0

func RunEndToEnd(ctx context.Context, config *config.E2ETestConfig) error

RunEndToEnd - code that exercises the verification and key server, simulating a mobile device uploading TEKs.

Types

type AndroidTarget added in v0.18.0

type AndroidTarget struct {
	Namespace              string `json:"namespace"`
	AppName                string `json:"app_name,omitempty"`
	PackageName            string `json:"package_name"`
	SHA256CertFingerprints string `json:"sha256_cert_fingerprints"`
}

AndroidTarget holds the android metadata for an App of AppResponse.

type App added in v0.18.0

type App struct {
	Region        string `json:"region"`
	IsEnx         bool   `json:"is_enx,omitempty"`
	AndroidTarget `json:"android_target"`
}

App represents single app for the AppResponse body.

type AppsResponse added in v0.18.0

type AppsResponse struct {
	Apps []App `json:"apps"`
}

AppsResponse is the body for the published list of android apps.

func AppSync added in v0.18.0

func AppSync(url string, timeout time.Duration, sizeLimit int64) (*AppsResponse, error)

AppSync makes the API call to synchronize mobile apps.

Jump to

Keyboard shortcuts

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