Formatting fixes

This commit is contained in:
Lukasz Leszczuk 2019-08-20 19:36:01 +02:00
parent 7ecb9fd2d6
commit 6f1c16f033

View File

@ -3,11 +3,12 @@ package providers
import ( import (
"errors" "errors"
"fmt" "fmt"
"github.com/dgrijalva/jwt-go"
"net/http" "net/http"
"net/url" "net/url"
"strings" "strings"
"github.com/dgrijalva/jwt-go"
"github.com/bitly/go-simplejson" "github.com/bitly/go-simplejson"
"github.com/pusher/oauth2_proxy/pkg/apis/sessions" "github.com/pusher/oauth2_proxy/pkg/apis/sessions"
"github.com/pusher/oauth2_proxy/pkg/logger" "github.com/pusher/oauth2_proxy/pkg/logger"
@ -326,9 +327,9 @@ func (p *AzureProvider) SetGroupsExemption(exemptions []string) {
func (p *AzureProvider) ValidateGroupWithSession(s *sessions.SessionState) bool { func (p *AzureProvider) ValidateGroupWithSession(s *sessions.SessionState) bool {
if len(p.PermittedGroups) != 0 { if len(p.PermittedGroups) != 0 {
for groupName, groupId := range p.PermittedGroups { for groupName, groupID := range p.PermittedGroups {
logger.Printf("ValidateGroup: %v", groupName) logger.Printf("ValidateGroup: %v", groupName)
if strings.Contains(s.Groups, groupId) { if strings.Contains(s.Groups, groupID) {
return true return true
} }
} }