proofofphonenumberverification

package
v0.0.0-...-eca782c Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HookResponseSchema = validation.NewSimpleSchema(`
{
	"type": "object",
	"additionalProperties": false,
	"properties": {
		"identity": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"type" : {
					"type": "string",
					"enum" : ["login_id"]
				},
				"login_id": {
					"type": "object",
					"properties": {
						"key": { "type": "string" },
						"type": { "type": "string" },
						"value": { "type": "string" }
					},
					"required": ["key", "type", "value"]
				}
			}
		}
	},
	"required": ["identity"]
}
`)
View Source
var InvalidConfiguration = apierrors.InternalError.WithReason("InvalidConfiguration")

Functions

This section is empty.

Types

type Hook

type Hook interface {
	Call(ctx context.Context, u *url.URL, hookReq *HookRequest) (*HookResponse, error)
}

type HookHTTPClient

type HookHTTPClient struct {
	*http.Client
}

type HookRequest

type HookRequest struct {
	ProofOfPhoneNumberVerification string `json:"proof_of_phone_number_verification"`
}

type HookResponse

type HookResponse struct {
	Identity *identity.Spec `json:"identity"`
}

func ParseHookResponse

func ParseHookResponse(ctx context.Context, r io.Reader) (*HookResponse, error)

type ProofOfPhoneNumberVerificationWebHook

type ProofOfPhoneNumberVerificationWebHook struct {
	hook.WebHook
	Client HookHTTPClient
	Logger WebhookMiddlewareLogger
}

func (*ProofOfPhoneNumberVerificationWebHook) Call

type Service

func (*Service) Verify

func (s *Service) Verify(ctx context.Context, proofOfPhoneNumberVerificationString string) (*HookResponse, error)

type WebhookMiddlewareLogger

type WebhookMiddlewareLogger struct{ *log.Logger }

func NewWebhookMiddlewareLogger

func NewWebhookMiddlewareLogger(lf *log.Factory) WebhookMiddlewareLogger

Jump to

Keyboard shortcuts

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