Skip to content

Commit

Permalink
Test out OIDC changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhric committed Jan 6, 2025
1 parent 45afed8 commit d00e602
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/rdpgw/protocol/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (p *Processor) Process(ctx context.Context) error {
// p.tunnel.User.UserName() (username)
clientIP := p.tunnel.User.GetAttribute(identity.AttrClientIp) // Extract client IP
sessionID := p.tunnel.User.SessionId()
username := p.tunnel.User.Email() // Extract username
username := p.tunnel.User.UserName() // Extract username

log.Printf(
"Establishing RDP Connection Details / ID: %s / ClientIP: %s / HostIP: %s / Username: %s",
Expand Down
2 changes: 1 addition & 1 deletion cmd/rdpgw/web/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (h *OIDC) HandleCallback(w http.ResponseWriter, r *http.Request) {
}

func findUsernameInClaims(data map[string]interface{}) string {
candidates := []string{"preferred_username", "unique_name", "upn", "username"}
candidates := []string{"email"}
for _, claim := range candidates {
userName, found := data[claim].(string)
if found {
Expand Down

0 comments on commit d00e602

Please sign in to comment.