Documentation
¶
Index ¶
- Constants
- func ChangeUserState(kratosPrivateAddr string, userID string, state string) error
- func CreateUser(req OryKratosCreateIdentitiyRequest) (string, error)
- func HandlePagingUsers(req *apistructs.UserPagingRequest, token string) (*common.UserPaging, error)
- func IdentityToUserInfo(i OryKratosIdentity) common.UserInfo
- func MigrationReady() bool
- func UpdateIdentity(kratosPrivateAddr string, userID string, req OryKratosUpdateIdentitiyRequest) error
- func UserMigration(req OryKratosCreateIdentitiyRequest) (string, error)
- func Whoami(kratosPublicAddr string, sessionID string) (common.UserInfo, error)
- type Config
- type IdentityService
- type Interface
- type OryKratosAdminIdentityImportCredentials
- type OryKratosAdminIdentityImportCredentialsPassword
- type OryKratosCreateIdentitiyRequest
- type OryKratosFlowResponse
- type OryKratosFlowResponseUI
- type OryKratosIdentity
- type OryKratosIdentityCredentialsPasswordConfig
- type OryKratosIdentityTraits
- type OryKratosReadyResponse
- type OryKratosRegistrationRequest
- type OryKratosRegistrationResponse
- type OryKratosSession
- type OryKratosUpdateIdentitiyRequest
- type UserIDModel
Constants ¶
View Source
const ( UserActive = "active" UserInActive = "inactive" )
Variables ¶
This section is empty.
Functions ¶
func ChangeUserState ¶
func CreateUser ¶
func CreateUser(req OryKratosCreateIdentitiyRequest) (string, error)
func HandlePagingUsers ¶
func HandlePagingUsers(req *apistructs.UserPagingRequest, token string) (*common.UserPaging, error)
func IdentityToUserInfo ¶
func IdentityToUserInfo(i OryKratosIdentity) common.UserInfo
func MigrationReady ¶
func MigrationReady() bool
func UpdateIdentity ¶
func UpdateIdentity(kratosPrivateAddr string, userID string, req OryKratosUpdateIdentitiyRequest) error
func UserMigration ¶
func UserMigration(req OryKratosCreateIdentitiyRequest) (string, error)
Types ¶
type Config ¶
type Config struct {
OryKratosPrivateAddr string `default:"kratos-admin" file:"ORY_KRATOS_ADMIN_ADDR" env:"ORY_KRATOS_ADMIN_ADDR"`
}
type IdentityService ¶
type IdentityService struct {
Provider *provider
}
type OryKratosAdminIdentityImportCredentials ¶
type OryKratosAdminIdentityImportCredentials struct {
Password *OryKratosAdminIdentityImportCredentialsPassword `json:"password"`
}
type OryKratosAdminIdentityImportCredentialsPassword ¶
type OryKratosAdminIdentityImportCredentialsPassword struct {
Config OryKratosIdentityCredentialsPasswordConfig `json:"config"`
}
type OryKratosCreateIdentitiyRequest ¶
type OryKratosCreateIdentitiyRequest struct {
SchemaID string `json:"schema_id"`
Traits OryKratosIdentityTraits `json:"traits"`
Credentials OryKratosAdminIdentityImportCredentials `json:"credentials"`
}
type OryKratosFlowResponse ¶
type OryKratosFlowResponse struct {
ID string `json:"id"`
UI OryKratosFlowResponseUI `json:"ui"`
}
type OryKratosFlowResponseUI ¶
type OryKratosFlowResponseUI struct {
Action string `json:"action"`
}
type OryKratosIdentity ¶
type OryKratosIdentity struct {
ID common.USERID `json:"id"`
SchemaID string `json:"schema_id"`
State string `json:"state"`
Traits OryKratosIdentityTraits `json:"traits"`
}
type OryKratosIdentityTraits ¶
type OryKratosReadyResponse ¶
type OryKratosReadyResponse struct {
Status string `json:"status"`
}
type OryKratosRegistrationRequest ¶
type OryKratosRegistrationRequest struct {
Traits OryKratosIdentityTraits `json:"traits"`
Password string `json:"password"`
Method string `json:"method"`
}
type OryKratosRegistrationResponse ¶
type OryKratosRegistrationResponse struct {
Identity OryKratosIdentity `json:"identity"`
}
type OryKratosSession ¶
type OryKratosSession struct {
ID string `json:"id"`
Active bool `json:"active"`
Identity OryKratosIdentity `json:"identity"`
}
type OryKratosUpdateIdentitiyRequest ¶
type OryKratosUpdateIdentitiyRequest struct {
State string `json:"state"`
Traits OryKratosIdentityTraits `json:"traits"`
}
type UserIDModel ¶
Click to show internal directories.
Click to hide internal directories.