Documentation ¶
Overview ¶
Package google has the implmentations for google oauth and google user profile fetch
Index ¶
Constants ¶
View Source
const ( //RedirectURLKey is the key storing for the google oauth redirect url RedirectURLKey = "OAUTH2_GOOGLE_REDIRECT_URL" //ClientIDKey is the key storing for the google oauth client id ClientIDKey = "OAUTH2_GOOGLE_CLIENT_ID" //ClientSecretKey is the key storing for the google oauth client secret ClientSecretKey = "OAUTH2_GOOGLE_CLIENT_SECRET" //ProfileScopeKey is the key storing for the google user profile scope ProfileScopeKey = "OAUTH2_GOOGLE_USER_PROFILE_SCOPE" //EmailScopeKey is the key storing for the google user email scope EmailScopeKey = "OAUTH2_GOOGLE_USER_EMAIL_SCOPE" //UserInfoURLKey is the key storing the url which gives google user info UserInfoURLKey = "OAUTH2_GOOGLE_USER_INFO_URL" //UserInfoNameKey is the key storing the name key in the google user info UserInfoNameKey = "OAUTH2_GOOGLE_USER_INFO_NAME" //UserInfoEmailKey is the key storing the email key in the google user info UserInfoEmailKey = "OAUTH2_GOOGLE_USER_INFO_EMAIL" //UserInfoPictureKey is the key storing the picture key in the google user info UserInfoPictureKey = "OAUTH2_GOOGLE_USER_INFO_PICTURE" //UserInfoTimeoutKey is the key storing the user info google fetch timeout UserInfoTimeoutKey = "OAUTH2_GOOGLE_USER_INFO_TIMEOUT" )
Variables ¶
View Source
var Config *oauth2.Config
Config is the google oauth2 config
View Source
var UserInfoMap oauth.UserInfoMap
UserInfoMap has the user info map required for the google use profile
View Source
var UserInfoTimeout = time.Duration(10000 * time.Millisecond)
UserInfoTimeout is the timeout for the fetching the user info from google auth agent
View Source
var UserInfoURL string
UserInfoURL is the url to hit to get the user info from google
Functions ¶
func LoadConfig ¶
func LoadConfig() error
LoadConfig will load the config required for the google oauth
Types ¶
Click to show internal directories.
Click to hide internal directories.