controller

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2019 License: NCSA Imports: 8 Imported by: 0

Documentation

Index

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

func SetupController(route *mux.Route)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL