controller

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 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 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

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