Documentation
¶
Index ¶
Constants ¶
View Source
const ( RequestPending = "request.pending" RequestInvalid = "request.invalid" VerificationCancelled = "verification.cancelled" RequestTimeout = "request.timeout" VerificationAccepted = "verification.accepted" VerificationDeclined = "verification.declined" VerificationStatusChanged = "verification.status.changed" RequestDeleted = "request.deleted" RequestReceived = "request.received" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallbackResponse ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetVerificationUrl ¶
func (*Client) GetVerificationUrlTtl ¶
type Config ¶
type Config struct {
Host string `yaml:"host" json:"host" mapstructure:"host" validate:"required"`
ClientId string `yaml:"client_id" json:"client_id" mapstructure:"client_id" validate:"required"`
Secret string `yaml:"secret" json:"secret" mapstructure:"secret" validate:"required"`
CallbackUrl string `yaml:"callback_url" json:"callback_url" mapstructure:"callback_url"`
VerificationUrlTtl int `yaml:"verification_url_ttl" json:"verification_url_ttl" mapstructure:"verification_url_ttl" validate:"required"` // The ttl for the verificaiton url in minutes
}
type DocumentVerification ¶
type DocumentVerification struct {
Proof string `json:"proof"`
SupportedTypes []string `json:"supported_types"`
Name string `json:"name"`
Dob string `json:"dob"`
IssueDate string `json:"issue_date"`
ExpiryDate string `json:"expiry_date"`
DocumentNumber string `json:"document_number"`
FetchEnhancedData string `json:"fetch_enhanced_data"`
Gender string `json:"gender"`
PlaceOfIssue string `json:"place_of_issue"`
}
type ShuftiAuthMiddleware ¶
type ShuftiAuthMiddleware struct {
// contains filtered or unexported fields
}
func NewShuftiAuthMiddleware ¶
func NewShuftiAuthMiddleware(config *Config) (*ShuftiAuthMiddleware, error)
func (*ShuftiAuthMiddleware) VerifySignature ¶
func (s *ShuftiAuthMiddleware) VerifySignature() gin.HandlerFunc
type VerificationRequest ¶
type VerificationRequest struct {
Reference string `json:"reference"`
CallbackUrl string `json:"callback_url"`
RedirectUrl string `json:"redirect_url"`
Email string `json:"email"`
Country string `json:"country"`
VerificationMode string `json:"verification_mode"`
Language string `json:"language,omitempty"`
AllowOffline string `json:"allow_offline"`
AllowOnline string `json:"allow_online"`
AllowRetry string `json:"allow_retry"`
ShowPrivacyPolicy string `json:"show_privacy_policy"`
ShowResults string `json:"show_results"`
ShowConsent string `json:"show_consent"`
ShowFeedbackForm string `json:"show_feedback_form"`
Ttl int `json:"ttl"`
Document DocumentVerification `json:"document"`
}
Click to show internal directories.
Click to hide internal directories.