Documentation ¶
Index ¶
- func CLIAuthorizationFile() (file string)
- func CLIConfigurationFile() (file string)
- func CLIPleaseAuthenticateError() (err error)
- func GetLanguage(ctx *gin.Context, accepted ...string) (language string)
- func LoadJSON(s *Settings, file string) (err error)
- func RedirectToLogin(ctx *gin.Context)
- func RedirectToLogout(ctx *gin.Context, page string)
- type Authority
- type Settings
- type UID
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CLIAuthorizationFile ¶
func CLIAuthorizationFile() (file string)
CLIAuthorizationFile returns the file where the authorization information is stored.
func CLIConfigurationFile ¶
func CLIConfigurationFile() (file string)
CLIConfigurationFile returns the file where the configuration information is stored.
func CLIPleaseAuthenticateError ¶
func CLIPleaseAuthenticateError() (err error)
CLIPleaseAuthenticateError returns an error to ask the user to authenticate.
func GetLanguage ¶
GetLanguage .
Types ¶
type Authority ¶
Authority is the main object to be used to authenticate.
func (Authority) CLIAuthenticate ¶
CLIAuthenticate opens a browser to authenticate the user.
func (Authority) CLIAuthenticateURL ¶
CLIAuthenticateURL returns the URL to authenticate the user.
type Settings ¶
type Settings struct { UseHTTPS bool Domain string GoogleClientID string GoogleClientSecret string GoogleCallbackPage string RandomString string }
Settings contains the required settings for uauth.
func (*Settings) NewAuthority ¶
NewAuthority creates a main object to be used to authenticate the users. It also registers a session to be used by gin.
func (*Settings) VerifyUauth ¶
VerifyUauth verifies the settings are correct.
type User ¶
User contains the user information.
func CLIGetAuthentication ¶
CLIGetAuthentication gets the user from the saved file.
func VerifyUser ¶
VerifyUser verifies if the user is authenticated.