authdata

package
v2.7.4-rc.3 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteTokenFromUserCache

func DeleteTokenFromUserCache(ctx context.Context) error

DeleteTokenFromUserCache removes token cache if existing or returns an error

func DeleteUserInfoFromUserCache

func DeleteUserInfoFromUserCache(ctx context.Context) error

DeleteUserInfoFromUserCache removes user info cache if existing or returns an error. An attempt to remove a non-existing cache is a no-op and the function returns nil.

func LoadTokenFromUserCache

func LoadTokenFromUserCache(ctx context.Context) (*oauth2.Token, error)

LoadTokenFromUserCache gets the token instance from cache or returns an error if something goes wrong while loading or unmarshalling.

func SaveTokenToUserCache

func SaveTokenToUserCache(ctx context.Context, token *oauth2.Token) error

SaveTokenToUserCache saves the provided token to user cache and returns an error if something goes wrong while marshalling or persisting.

func SaveUserInfoToUserCache

func SaveUserInfoToUserCache(ctx context.Context, userInfo *UserInfo) error

SaveUserInfoToUserCache saves the provided user info to user cache and returns an error if something goes wrong while marshalling or persisting.

Types

type UserInfo

type UserInfo = connector.UserInfo

func LoadUserInfoFromUserCache

func LoadUserInfoFromUserCache(ctx context.Context) (*UserInfo, error)

LoadUserInfoFromUserCache gets the user info from cache or returns an error if something goes wrong while loading or unmarshalling.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL