mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-29 13:46:41 +00:00
management OIDC implementation using pkce
This commit is contained in:
@@ -36,6 +36,11 @@ func (Password) Type() Method {
|
||||
func (p Password) Authenticate(r *http.Request) (string, string) {
|
||||
password := r.FormValue(passwordFormId)
|
||||
|
||||
if password == "" {
|
||||
// This cannot be authenticated so not worth wasting time sending the request.
|
||||
return "", passwordFormId
|
||||
}
|
||||
|
||||
res, err := p.client.Authenticate(r.Context(), &proto.AuthenticateRequest{
|
||||
Id: p.id,
|
||||
AccountId: p.accountId,
|
||||
@@ -56,7 +61,3 @@ func (p Password) Authenticate(r *http.Request) (string, string) {
|
||||
|
||||
return "", passwordFormId
|
||||
}
|
||||
|
||||
func (p Password) Middleware(next http.Handler) http.Handler {
|
||||
return next
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user