Handle HTTP/HTTPS protocol depending on dev env or not

This commit is contained in:
2022-11-07 01:35:06 +01:00
parent 356bfc6a86
commit e2ff98094b
6 changed files with 44 additions and 3 deletions

View File

@@ -50,7 +50,7 @@ func (op *OIDCHandler) AuthEndpoint(w http.ResponseWriter, r *http.Request) {
sessionData := &openid.DefaultSession{
Claims: &jwt.IDTokenClaims{
Issuer: fmt.Sprintf("http://%s/%s", r.Host, namespace),
Issuer: fmt.Sprintf("%s://%s/%s", op.Protocol, r.Host, namespace),
Subject: account.ID,
Audience: []string{},
ExpiresAt: time.Now().Add(time.Hour * 30),