Documentation ¶
Index ¶
- func AddRole(w http.ResponseWriter, r *http.Request)
- func Authorize(w http.ResponseWriter, r *http.Request)
- func GetCurrentUserRoles(w http.ResponseWriter, r *http.Request)
- func GetRoles(w http.ResponseWriter, r *http.Request)
- func GetRolesLists(w http.ResponseWriter, r *http.Request)
- func GetUserListByRole(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 GetCurrentUserRoles ¶ added in v0.3.0
func GetCurrentUserRoles(w http.ResponseWriter, r *http.Request)
Gets the roles for the current user.
func GetRoles ¶
func GetRoles(w http.ResponseWriter, r *http.Request)
Gets the roles for the user with the given id.
func GetRolesLists ¶ added in v0.4.0
func GetRolesLists(w http.ResponseWriter, r *http.Request)
Responds with a list of valid roles
func GetUserListByRole ¶ added in v0.4.0
func GetUserListByRole(w http.ResponseWriter, r *http.Request)
Responds with a list of user with the requested role
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.