Documentation ¶
Index ¶
- func AcquireCredentialToken() (string, error)
- func AcquirePublicToken(account, password string) (string, error)
- func InitAAD()
- func InitCredentialClient() (*msgraphsdk.GraphServiceClient, error)
- func InitPublicClient(account, password string) (*msgraphsdk.GraphServiceClient, error)
- func QueryAndSave(account string) (*models.User, error)
- func QueryMailAndSave(email string) (*models.User, error)
- func QueryUserPhotoById(userId, token string) string
- func QueryUserPhotoByName(username, token string) string
- type AuthReply
- type QueryReply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcquireCredentialToken ¶
func AcquirePublicToken ¶
func InitCredentialClient ¶
func InitCredentialClient() (*msgraphsdk.GraphServiceClient, error)
func InitPublicClient ¶
func InitPublicClient(account, password string) (*msgraphsdk.GraphServiceClient, error)
func QueryUserPhotoById ¶
func QueryUserPhotoByName ¶
Types ¶
type AuthReply ¶
type AuthReply struct { IsAuthenticated bool Error string Account string Name string First string Last string Email string Depart string Avatar string }
func AuthenticatePublicClient ¶
Authenticate do auth and return Auth object including user information and lognin success or not Required Delegated Permission: User.Read, and Grant admin consent as this is a Daemon web api. account could be the pricipal user name in AAD or mail of login user
Click to show internal directories.
Click to hide internal directories.