code: func GetValidJWT(r *http.Request, publicKey *ecdsa.PublicKey) (token *jwt.Token, err error) {
  	authorizationHeader := r.Header.Get("Authorization")
  	if !strings.HasPrefix(authorizationHeader, "bearer ") && !strings.HasPrefix(authorizationHeader, "Bearer ") {
  		return
  	}
  	jwtstring := strings.TrimSpace(strings.TrimPrefix(strings.TrimPrefix(authorizationHeader, "Bearer"), "bearer"))
  	token, err = jwt.Parse(jwtstring, func(token *jwt.Token) (interface{}, error) {
  		m, ok := token.Method.(*jwt.SigningMethodECDSA)
  		if !ok {
  			return nil, fmt.Errorf("Unexpected signing method: %v", token.Header["alg"])
  		}
  		if token.Header["alg"] != m.Alg() {
  			return nil, fmt.Errorf("Unexpected signing algorithm: %v", token.Header["alg"])
  		}
  		return publicKey, nil
  	})
  	if err == nil && !token.Valid {
  		err = errors.New("Invalid jwt supplied:" + jwtstring)
  	}
  	return
  }
docs: //GetValidJWT returns a validated ES384 signed jwt from the authorization header that needs to start with "bearer "
  // If no jwt is found in the authorization header, nil is returned
  // Validation against the supplied publickey is performed