Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartServer ¶
StartServer starts up the little web server serving up the page needed for the authentication.
Types ¶
type AuthCredential ¶
type AuthData ¶
type AuthData struct { User AuthUser Credential AuthCredential Token TokenBody }
type Profile ¶
type Profile struct { Email string FirebaseUserId string Id int IsEnabled bool IsVerified bool Name string PublisherId string }
Profile structs
type ProfileBody ¶
func FetchDeveloperProfile ¶
func FetchDeveloperProfile(tokenBody TokenBody, developerProfileURL string) (ProfileBody, error)
FetchDeveloperProfile gets the profile of the current user from the Profile Api.
type StsTokenManager ¶
type StsTokenManager struct { ApiKey string RefreshToken string AccessToken string ExpirationTime int }
Auth structs
type TokenBody ¶
type TokenBody struct { AccessToken string `json:"access_token"` ExpiresIn string `json:"expires_in"` ExpiresAt time.Time `json:"expires_at"` IdToken string `json:"id_token"` ProjectId string `json:"project_id"` RefreshToken string `json:"refresh_token"` TokenType string `json:"token_type"` UserId string `json:"user_id"` }
Token structs
func LoadAuthToken ¶
LoadAuthToken checks if the user is already logged in, it tries to load the locally stored Authentication token, and refreshes it. If the user is not logged in, it returns an error.
Click to show internal directories.
Click to hide internal directories.