Skip to content

Commit

Permalink
Added insecure TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
JarcauCristian committed Dec 31, 2023
1 parent dcbbe8b commit 0588959
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"crypto/tls"
"encoding/json"
"fmt"
"github.com/gin-gonic/gin"
Expand Down Expand Up @@ -484,7 +485,10 @@ func main() {
}

func verifyToken(tokenString string) bool {
client := &http.Client{}
tr := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}
client := &http.Client{Transport: tr}
req, _ := http.NewRequest("GET", "https://62.72.21.79:8442/auth/realms/react-keycloak/protocol/openid-connect/userinfo", nil)
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", tokenString))
response, err := client.Do(req)
Expand Down

0 comments on commit 0588959

Please sign in to comment.