Skip to content

Commit

Permalink
#344 formatting, add README entry
Browse files Browse the repository at this point in the history
  • Loading branch information
bnfinet committed Feb 19, 2021
1 parent 09a5fcb commit 4e10aee
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Vouch Proxy supports many OAuth and OIDC login providers and can enforce authent
- [Okta](https://developer.okta.com/blog/2018/08/28/nginx-auth-request)
- [ADFS](https://github.com/vouch/vouch-proxy/pull/68)
- [Azure AD](https://github.com/vouch/vouch-proxy/issues/290)
- [Alibaba / Aliyun iDaas](https://github.com/vouch/vouch-proxy/issues/344)
- [AWS Cognito](https://github.com/vouch/vouch-proxy/issues/105)
- [Gitea](https://github.com/vouch/vouch-proxy/blob/master/config/config.yml_example_gitea)
- Keycloak
Expand Down
4 changes: 2 additions & 2 deletions handlers/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ OR CONDITIONS OF ANY KIND, either express or implied.
package handlers

import (
"github.com/vouch/vouch-proxy/pkg/providers/alibaba"
"golang.org/x/oauth2"
"net/http"

"github.com/gorilla/sessions"
"go.uber.org/zap"
"golang.org/x/oauth2"

"github.com/vouch/vouch-proxy/pkg/cfg"
"github.com/vouch/vouch-proxy/pkg/cookie"
"github.com/vouch/vouch-proxy/pkg/providers/adfs"
"github.com/vouch/vouch-proxy/pkg/providers/alibaba"
"github.com/vouch/vouch-proxy/pkg/providers/azure"
"github.com/vouch/vouch-proxy/pkg/providers/common"
"github.com/vouch/vouch-proxy/pkg/providers/github"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cfg/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var (
HomeAssistant: "homeassistant",
OpenStax: "openstax",
Nextcloud: "nextcloud",
Alibaba: "alibaba",
Alibaba: "alibaba",
}
)

Expand Down
3 changes: 2 additions & 1 deletion pkg/providers/alibaba/alibaba.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ package alibaba

import (
"encoding/json"
"golang.org/x/oauth2"
"io/ioutil"
"net/http"

"golang.org/x/oauth2"

"github.com/vouch/vouch-proxy/pkg/cfg"
"github.com/vouch/vouch-proxy/pkg/providers/common"
"github.com/vouch/vouch-proxy/pkg/structs"
Expand Down
16 changes: 9 additions & 7 deletions pkg/structs/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ func (u *NextcloudUser) PrepareUserData() {
}
}

//Alibaba Aliyun
// AlibabaUser Aliyun
type AlibabaUser struct {
User
Data AliData `json:"data"`
Data AliData `json:"data"`
// jwt.StandardClaims
}

Expand All @@ -200,14 +200,16 @@ func (u *AlibabaUser) PrepareUserData() {
u.ID = id
}

// AliData `data` subobject of Alibaba User response
// https://github.com/vouch/vouch-proxy/issues/344
type AliData struct {
Sub string `json:"sub"`
Sub string `json:"sub"`
Username string `json:"username"`
Nickname string `json:"nickname"`
Email string `json:"email"`
ID string `json:"ou_id"`
Phone string `json:"phone_number"`
OuName string `json:"ou_name"`
Email string `json:"email"`
ID string `json:"ou_id"`
Phone string `json:"phone_number"`
OuName string `json:"ou_name"`
}

// Team has members and provides acess to sites
Expand Down

0 comments on commit 4e10aee

Please sign in to comment.