mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-05 14:37:45 +00:00
320679467b
* feat: change login to command side * feat: change login to command side * fix: fix push on user * feat: user command side * feat: sign out * feat: command side login * feat: command side login * feat: fix register user * feat: fix register user * feat: fix web auth n events * feat: add machine keys * feat: send codes * feat: move authrequest to domain * feat: move authrequest to domain * feat: webauthn working * feat: external users * feat: external users login * feat: notify users * fix: tests * feat: cascade remove user grants on project remove * fix: webauthn * fix: pr requests * fix: register human with member * fix: fix bugs * fix: fix bugs
23 lines
470 B
Go
23 lines
470 B
Go
package domain
|
|
|
|
import (
|
|
"net"
|
|
net_http "net/http"
|
|
|
|
http_util "github.com/caos/zitadel/internal/api/http"
|
|
)
|
|
|
|
type BrowserInfo struct {
|
|
UserAgent string
|
|
AcceptLanguage string
|
|
RemoteIP net.IP
|
|
}
|
|
|
|
func BrowserInfoFromRequest(r *net_http.Request) *BrowserInfo {
|
|
return &BrowserInfo{
|
|
UserAgent: r.Header.Get(http_util.UserAgentHeader),
|
|
AcceptLanguage: r.Header.Get(http_util.AcceptLanguage),
|
|
RemoteIP: http_util.RemoteIPFromRequest(r),
|
|
}
|
|
}
|