Documentation ¶
Index ¶
- Constants
- func CreateUser(ctx context.Context, clientID, clientSecret, app, org, usr, pwd string) error
- func DeleteToken(ctx context.Context, clientID, clientSecret, owner, name string) error
- func DeleteUser(ctx context.Context, clientID, clientSecret, org, usr string) error
- func IsConnected(ctx context.Context) error
- func SignInUser(ctx context.Context, app, org, usr, pwd string) ([]*req.HttpCookie, error)
- func SignOutUser(ctx context.Context, userSessions []*req.HttpCookie) error
- func UnwrapSession(sessions []*req.HttpCookie) string
- func UpdateUserPassword(ctx context.Context, clientID, clientSecret, org, usr, oldPwd, newPwd string) error
- func Wait(ctx context.Context, serverUrl string) (err error)
- func WrapSession(value string) []*req.HttpCookie
- type ApplicationCredential
- type Embedded
- type Introspection
- type Token
- type User
- type UserInfo
Constants ¶
View Source
const ( BuiltinOrg = "built-in" BuiltinApp = "app-built-in" BuiltinAdmin = "admin" BuiltinAdminInitPwd = "Admin@123" )
Variables ¶
This section is empty.
Functions ¶
func CreateUser ¶
func DeleteToken ¶
func DeleteUser ¶
func IsConnected ¶
func SignInUser ¶
func SignOutUser ¶
func SignOutUser(ctx context.Context, userSessions []*req.HttpCookie) error
func UnwrapSession ¶
func UnwrapSession(sessions []*req.HttpCookie) string
UnwrapSession returns the value of casdoor login succeeded session.
func UpdateUserPassword ¶
func WrapSession ¶
func WrapSession(value string) []*req.HttpCookie
WrapSession wraps the value as casdoor login succeeded session.
Types ¶
type ApplicationCredential ¶
type ApplicationCredential struct { ClientID string `json:"clientId,omitempty"` ClientSecret string `json:"clientSecret,omitempty"` }
func GetApplicationCredential ¶
func GetApplicationCredential( ctx context.Context, adminSession []*req.HttpCookie, appz string, ) (*ApplicationCredential, error)
type Introspection ¶
type Introspection struct { Organization string `json:"organization"` UserName string `json:"username"` Active bool `json:"active"` Exp int64 `json:"exp"` }
func IntrospectToken ¶
func IntrospectToken(ctx context.Context, clientID, clientSecret, token string) (*Introspection, error)
type Token ¶
Click to show internal directories.
Click to hide internal directories.