Documentation ¶
Index ¶
- func AddRole(w http.ResponseWriter, r *http.Request)
- func Authorize(w http.ResponseWriter, r *http.Request)
- func GetRoles(w http.ResponseWriter, r *http.Request)
- func Login(w http.ResponseWriter, r *http.Request)
- func RefreshToken(w http.ResponseWriter, r *http.Request)
- func RemoveRole(w http.ResponseWriter, r *http.Request)
- func SetupController(route *mux.Route)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRole ¶
func AddRole(w http.ResponseWriter, r *http.Request)
Adds a role to the user with the given id.
func Authorize ¶
func Authorize(w http.ResponseWriter, r *http.Request)
Redirects the client to the OAuth authorization url of the specified provider.
func GetRoles ¶
func GetRoles(w http.ResponseWriter, r *http.Request)
Gets the roles for the user with the given id.
func Login ¶
func Login(w http.ResponseWriter, r *http.Request)
Converts a valid OAuth authorization code in the request body to an OAuth token. Gets basic user information from the OAuth provider and returns a JWT.
func RefreshToken ¶
func RefreshToken(w http.ResponseWriter, r *http.Request)
Responds with a new JWT token for the user, with updated information.
func RemoveRole ¶
func RemoveRole(w http.ResponseWriter, r *http.Request)
Removes a role for the user with the given id.
func SetupController ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.