uiamsdk

package
Version: v0.7.2 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 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 AuthBindingRequest

type AuthBindingRequest struct {
	BaseRequest

	UserID      uint64                        `json:"user_id"`
	Provider    uiammodel.ConnectProviderEnum `json:"provider"`
	OauthID     string                        `json:"oauth_id"`
	UnionID     string                        `json:"union_id"`
	AppUserName string                        `json:"app_user_name"`
	AppUserID   string                        `json:"app_user_id"`
	Credential  uiammodel.Attribute           `json:"credential"`
}

AuthBindingRequest auth 绑定

type AuthCreateRequest

type AuthCreateRequest struct {
	BaseRequest

	Provider    uiammodel.ConnectProviderEnum `json:"provider"`
	OauthID     string                        `json:"oauth_id" binding:"required,min=4"`
	UnionID     string                        `json:"union_id"`
	AppUserID   string                        `json:"app_user_id"`
	AppUserName string                        `json:"app_user_name"`
	Credential  uiammodel.Attribute           `json:"credential"`
}

AuthCreateRequest AuthCreateRequest

type AuthIDCreateRequest

type AuthIDCreateRequest struct {
	BaseRequest

	Provider     uiammodel.ConnectProviderEnum `json:"provider"`
	IdentityName string                        `json:"username"`
	PhoneCode    string                        `json:"phone_code"`
	PhoneNumber  string                        `json:"phone_number"`
	Email        string                        `json:"email"`
	AvatarURL    string                        `json:"avatar_url"`
	Description  string                        `json:"description"`
	OauthID      string                        `json:"oauth_id" binding:"required,min=4"`
	UnionID      string                        `json:"union_id"`
	AppUserID    string                        `json:"app_user_id"`
	AppUserName  string                        `json:"app_user_name"`
	Credential   uiammodel.Attribute           `json:"credential"`
}

AuthIDCreateRequest AuthIDCreateRequest

type AuthListRequest

type AuthListRequest struct {
	BaseRequest

	Offset   int                           `form:"offset" binding:"gte=0"`
	Limit    int                           `form:"limit" binding:"required,gte=1,lte=500"`
	Provider uiammodel.ConnectProviderEnum `form:"provider"`
}

AuthListRequest 用户表求

type AuthUpdateRequest

type AuthUpdateRequest struct {
	BaseRequest

	Provider    uiammodel.ConnectProviderEnum `json:"provider"`
	OauthID     string                        `json:"oauth_id"`
	UnionID     string                        `json:"union_id"`
	AppUserID   string                        `json:"app_user_id"`
	AppUserName string                        `json:"app_user_name"`
	Credential  uiammodel.Attribute           `json:"credential"`
}

AuthUpdateRequest AuthUpdateRequest

type AuthVerifyRequest

type AuthVerifyRequest struct {
	BaseRequest

	Scheme      uiammodel.AuthSchemeEnum `json:"scheme"` // 如果没有 Scheme,就按 Raw 解析
	Credentials string                   `json:"credentials"`
	RawAuth     string                   `json:"raw_auth"`
}

AuthVerifyRequest AuthVerifyRequest

type BasePageRequest

type BasePageRequest struct {
	BaseRequest

	Offset uint64 `form:"offset"`
	Limit  uint64 `form:"limit"`
}

BasePageRequest BasePageRequest

type BaseRequest

type BaseRequest struct {
	RealmID    string `json:"realm_id"`
	IdentityID string `json:"identity_id"`
}

BaseRequest BaseRequest

type IdentityChangePhoneRequest

type IdentityChangePhoneRequest struct {
	BaseRequest

	PhoneCode   string `json:"phone_code" binding:"required,min=1"`
	PhoneNumber string `json:"phone_number" binding:"required,min=1"`
	Email       string `json:"email"`
}

IdentityChangePhoneRequest IdentityRequest

type IdentityKycRequest

type IdentityKycRequest struct {
	BaseRequest

	IdentityID       string                  `json:"identity_id"`
	Country          uiammodel.CountryEnum   `json:"country"`
	Gender           string                  `json:"gender" binding:"required,min=1"`
	Name             string                  `json:"name" binding:"required,min=1"`
	IDType           uiammodel.IDTypeEnum    `json:"id_type"`
	IDNo             string                  `json:"id_no"`
	Nation           string                  `json:"nation"`
	Birth            string                  `json:"birth"`
	IDValidDateStart string                  `json:"id_valid_date_start"`
	IDValidDateEnd   string                  `json:"id_valid_date_end"`
	EffectedAt       string                  `json:"effected_at"`
	ExpiredAt        string                  `json:"expired_at"`
	Address          string                  `json:"address"`
	IssuedBy         string                  `json:"issued_by"`
	KycLevel         uiammodel.KycLevelEnum  `json:"kyc_level"`
	KycStatus        uiammodel.KycStatusEnum `json:"kyc_status"`
	KycError         string                  `json:"kyc_error"`
	CertifiedAt      *time.Time              `json:"certified_at" binding:"" time_format:"2006-01-02T15:04:05Z07:00"`
}

IdentityKycRequest IdentityKycRequest

type IdentityListRequest

type IdentityListRequest struct {
	BaseRequest

	Offset      int                           `form:"offset" binding:"gte=0"`
	Limit       int                           `form:"limit" binding:"gte=0,lte=500"`
	PhoneCode   string                        `form:"phone_code"`
	PhoneNumber string                        `form:"phone_number"`
	OAuthAppID  string                        `form:"app_user_id"`
	Provider    uiammodel.ConnectProviderEnum `form:"provider"`
	Batch       string                        `form:"batch"`
	Expand      string                        `form:"expand"`
}

IdentityListRequest 用户表求

type IdentityUpdateBasicRequest

type IdentityUpdateBasicRequest struct {
	IdentityUUID string              `json:"user_id"`
	Username     string              `json:"username"`
	Description  string              `json:"description"`
	AvatarURL    string              `json:"avatar_url"`
	Attributes   uiammodel.Attribute `json:"attributes"`
}

IdentityUpdateBasicRequest UpdateRequest

type IdentityUpdateRequest

type IdentityUpdateRequest struct {
	BaseRequest

	IdentityUUID string                       `json:"uuid"`
	IdentityName string                       `json:"username"`
	PhoneCode    string                       `json:"phone_code"`
	PhoneNumber  string                       `json:"phone_number"`
	Email        string                       `json:"email"`
	Password     string                       `json:"password"`
	AvatarURL    string                       `json:"avatar_url"`
	Description  string                       `json:"description"`
	Remark       string                       `json:"remark"`
	Attributes   uiammodel.Attribute          `json:"attributes"`
	Status       uiammodel.IdentityStatusEnum `json:"status"`
}

IdentityUpdateRequest IdentityUpdateRequest

type IdentityUpsertRequest

type IdentityUpsertRequest struct {
	BaseRequest

	IdentityUUID string                     `json:"uuid"`
	IdentityName string                     `json:"username" binding:"required,min=1"`
	Type         uiammodel.IdentityTypeEnum `json:"type" binding:"required,min=1"`
	PhoneCode    string                     `json:"phone_code" binding:"required,min=1"`
	PhoneNumber  string                     `json:"phone_number" binding:"required,min=1"`
	Email        string                     `json:"email"`
	Password     string                     `json:"password"`
	AvatarURL    string                     `json:"avatar_url"`
	Description  string                     `json:"description"`
	Remark       string                     `json:"remark"`
	Attributes   uiammodel.Attribute        `json:"attributes"`
}

IdentityUpsertRequest IdentityUpsertRequest

type LoginRequest

type LoginRequest struct {
	BaseRequest

	Type        LoginTypeEnum `json:"type"`
	PhoneCode   string        `json:"phone_code"`
	PhoneNumber string        `json:"phone_number"`
	Email       string        `json:"email"`
	Password    string        `json:"password"`
}

LoginRequest LoginRequest

type LoginTypeEnum

type LoginTypeEnum string

LoginTypeEnum 枚举

const (
	LoginTypeEnumID    LoginTypeEnum = "id"
	LoginTypeEnumPhone LoginTypeEnum = "phone"
	LoginTypeEnumEmail LoginTypeEnum = "email"
)

func (LoginTypeEnum) String

func (e LoginTypeEnum) String() string

type PasswordVerifyRequest

type PasswordVerifyRequest struct {
	BaseRequest

	ID       string `json:"id"`
	Password string `json:"password"`
}

PasswordVerifyRequest PasswordVerifyRequest

type PhoneCodeVerifyRequest

type PhoneCodeVerifyRequest struct {
	BasePageRequest

	PhoneCode   string `json:"phone_code"`
	PhoneNumber string `json:"phone_number"`
	Code        string `json:"code"`
}

PhoneCodeVerifyRequest PhoneCodeVerifyRequest

type TokenCreateRequest

type TokenCreateRequest struct {
	BaseRequest

	JTI       string        `json:"jti,omitempty"`
	Audience  string        `json:"aud,omitempty"`
	Issuer    string        `json:"iss,omitempty"`
	NotBefore int64         `json:"nbf,omitempty"`
	Subject   string        `json:"sub,omitempty"`
	Duration  time.Duration `json:"duration"` // ExpriedAt 有效时长

	// Custom
	Type        uiammodel.AuthTypeEnum        `json:"type,omitempty"`
	Provider    uiammodel.ConnectProviderEnum `json:"oap,omitempty"`         // wechat/alipay 有需要吗?
	Scheme      uiammodel.AuthSchemeEnum      `json:"scheme,omitempty"`      // 签名方式
	UID         string                        `json:"uid,omitempty"`         // Audience 区别
	Device      string                        `json:"device,omitempty"`      // 每个 device 会有一个相对固定 session
	Description string                        `json:"description,omitempty"` // device 介绍
	SessionID   string                        `json:"sid,omitempty"`         // 使用哪个 session 进行签名
	Sign        string                        `json:"sig,omitempty"`         // ?
	SignAlg     string                        `json:"sal,omitempty"`         // ?
	Extra       string                        `json:"extra,omitempty"`       // 签名时,会把这部分也签进去
}

TokenCreateRequest TokenCreateRequest

type UserResetPasswordRequest

type UserResetPasswordRequest struct {
	UserID   string `json:"user_id"`
	RealmID  string `json:"realm_id"`
	Password string `json:"password"`
}

UserResetPasswordRequest UpdateRequest

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL