Esempio n. 1
0
// create authentication token for client_credentials grant type
func (c *AuthController) GetToken(res http.ResponseWriter, req services.AuxRequestContext, log *config.CustomLog, db *services.DB) {

	// get grant type
	grantType := req.FormValue("grant_type")

	// launch the appropriate function to produce the token
	switch grantType {
	case "client_credentials":
		c.GetClientCredentialToken(res, req, log, db)
		return
	}
}