mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 00:06:38 +00:00
add support for some basic authentication methods
This commit is contained in:
@@ -162,25 +162,27 @@ func (r *ReverseProxy) ToProtoMapping(operation Operation, setupKey string) *pro
|
||||
auth := &proto.Authentication{}
|
||||
|
||||
if r.Auth.PasswordAuth != nil && r.Auth.PasswordAuth.Enabled {
|
||||
auth.Password = &proto.Password{
|
||||
Enabled: true,
|
||||
Password: r.Auth.PasswordAuth.Password,
|
||||
}
|
||||
auth.Password = true
|
||||
}
|
||||
|
||||
if r.Auth.PinAuth != nil && r.Auth.PinAuth.Enabled {
|
||||
auth.Pin = &proto.Pin{
|
||||
Enabled: true,
|
||||
Pin: r.Auth.PinAuth.Pin,
|
||||
}
|
||||
auth.Pin = true
|
||||
}
|
||||
|
||||
if r.Auth.BearerAuth != nil && r.Auth.BearerAuth.Enabled {
|
||||
auth.Oidc = &proto.OIDC{
|
||||
Enabled: true,
|
||||
OidcProviderUrl: "", // TODO:
|
||||
OidcClientId: "", // TODO:
|
||||
OidcClientSecret: "", // TODO:
|
||||
OidcRedirectUrl: "", // TODO:
|
||||
OidcScopes: nil, // TODO:
|
||||
}
|
||||
}
|
||||
|
||||
if r.Auth.LinkAuth != nil && r.Auth.LinkAuth.Enabled {
|
||||
auth.Link = true
|
||||
}
|
||||
|
||||
return &proto.ProxyMapping{
|
||||
Type: operationToProtoType(operation),
|
||||
Id: r.ID,
|
||||
|
||||
Reference in New Issue
Block a user