mirror of
https://github.com/netbirdio/netbird.git
synced 2026-03-31 06:24:18 -04:00
Embed Dex as a built-in IdP to simplify self-hosting setup. Adds an embedded OIDC Identity Provider (Dex) with local user management and optional external IdP connectors (Google/GitHub/OIDC/SAML), plus device-auth flow for CLI login. Introduces instance onboarding/setup endpoints (including owner creation), field-level encryption for sensitive user data, a streamlined self-hosting provisioning script, and expanded APIs + test coverage for IdP management. more at https://github.com/netbirdio/netbird/pull/5008#issuecomment-3718987393
38 lines
1.0 KiB
Go
38 lines
1.0 KiB
Go
package auth
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type UserAuth struct {
|
|
// The account id the user is accessing
|
|
AccountId string
|
|
// The account domain
|
|
Domain string
|
|
// The account domain category, TBC values
|
|
DomainCategory string
|
|
// Indicates whether this user was invited, TBC logic
|
|
Invited bool
|
|
// Indicates whether this is a child account
|
|
IsChild bool
|
|
|
|
// The user id
|
|
UserId string
|
|
// The user's email address
|
|
// (optional, may be empty if not in token, make sure to set getUserInfo: true in Dex to have this field)
|
|
Email string
|
|
// The user's name
|
|
// (optional, may be empty if not in token, make sure to set getUserInfo: true in Dex to have this field)
|
|
Name string
|
|
// The user's preferred name
|
|
// (optional, may be empty if not in token, make sure to set getUserInfo: true in Dex to have this field)
|
|
PreferredName string
|
|
// Last login time for this user
|
|
LastLogin time.Time
|
|
// The Groups the user belongs to on this account
|
|
Groups []string
|
|
|
|
// Indicates whether this user has authenticated with a Personal Access Token
|
|
IsPAT bool
|
|
}
|