Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAuthNotFound is the error returned when Auth is not found in the user's config location ErrAuthNotFound = errors.New("auth not found") // ErrAuthEndpointChanged is the error returned when an Auth's endpoint has changed ErrAuthEndpointChanged = errors.New("auth endpoint changed") // ErrTokenExpired is the error returned when a token has expired ErrTokenExpired = errors.New("token expired") )
Functions ¶
func DeleteAuth ¶
func DeleteAuth() error
DeleteAuth deletes the Auth config from the user's config location
Types ¶
type Auth ¶
type Auth struct { Endpoint string `json:"endpoint"` AuthToken string `json:"authToken"` RefreshToken string `json:"refreshToken"` }
Auth represents an authentication info
func VerifyAuth ¶
VerifyAuth verifies the Auth config from the user's config location and returns it. When the specified endpoint is empty, the endpoint itself will not be checked. When ErrTokenExpired is returned, the Auth is returned and non-nil
func (*Auth) RenewAuthToken ¶
RenewAuthToken renews the `authToken` with the `refreshToken`
func (*Auth) SignInWithEmail ¶
SignInWithEmail signs in ProvenDB with email
Click to show internal directories.
Click to hide internal directories.