27 lines
495 B
Go
27 lines
495 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
"net/http"
|
|
"strconv"
|
|
|
|
"github.com/gorilla/mux"
|
|
)
|
|
|
|
func (s *server) handleRefreshToken() http.HandlerFunc {
|
|
return func(rw http.ResponseWriter, r *http.Request) {
|
|
|
|
vars, _ := mux.Vars(r)["id"]
|
|
jwtID, err := strconv.ParseInt(vars, 10, 64)
|
|
if err != nil {
|
|
log.Printf("erreur a la récupération id jwt (err=%v)", err)
|
|
}
|
|
|
|
fmt.Printf("le jwtID : %v", jwtID)
|
|
|
|
// Puis redisrect vers page resultat
|
|
//s.response(rw, r, resp, http.StatusOK)
|
|
}
|
|
}
|