mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-17 08:43:27 +00:00
stub out new gsuite directory service
This commit is contained in:
@@ -106,6 +106,7 @@
|
|||||||
<Compile Include="Models\ProfileResponse.cs" />
|
<Compile Include="Models\ProfileResponse.cs" />
|
||||||
<Compile Include="Models\TokenResponse.cs" />
|
<Compile Include="Models\TokenResponse.cs" />
|
||||||
<Compile Include="Services\ApiService.cs" />
|
<Compile Include="Services\ApiService.cs" />
|
||||||
|
<Compile Include="Services\GSuiteDirectoryService.cs" />
|
||||||
<Compile Include="Services\ControllerService.cs" />
|
<Compile Include="Services\ControllerService.cs" />
|
||||||
<Compile Include="Services\AzureDirectoryService.cs" />
|
<Compile Include="Services\AzureDirectoryService.cs" />
|
||||||
<Compile Include="Services\LdapDirectoryService.cs" />
|
<Compile Include="Services\LdapDirectoryService.cs" />
|
||||||
|
|||||||
35
src/Core/Services/GSuiteDirectoryService.cs
Normal file
35
src/Core/Services/GSuiteDirectoryService.cs
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
using Bit.Core.Models;
|
||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Bit.Core.Services
|
||||||
|
{
|
||||||
|
public class GSuiteDirectoryService : IDirectoryService
|
||||||
|
{
|
||||||
|
private static GSuiteDirectoryService _instance;
|
||||||
|
|
||||||
|
private GSuiteDirectoryService()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IDirectoryService Instance
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if(_instance == null)
|
||||||
|
{
|
||||||
|
_instance = new GSuiteDirectoryService();
|
||||||
|
}
|
||||||
|
|
||||||
|
return _instance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task<Tuple<List<GroupEntry>, List<UserEntry>>> GetEntriesAsync(bool force = false)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -87,6 +87,8 @@ namespace Bit.Core.Utilities
|
|||||||
{
|
{
|
||||||
case Enums.DirectoryType.AzureActiveDirectory:
|
case Enums.DirectoryType.AzureActiveDirectory:
|
||||||
return AzureDirectoryService.Instance;
|
return AzureDirectoryService.Instance;
|
||||||
|
case Enums.DirectoryType.GSuite:
|
||||||
|
return GSuiteDirectoryService.Instance;
|
||||||
default:
|
default:
|
||||||
return LdapDirectoryService.Instance;
|
return LdapDirectoryService.Instance;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user