public JsonWebTokenService(IOptionsMonitor <CryptoConfiguration> cryptoConfiguration, IEntityIdManager entityIdManager) { Guard.NotNull(cryptoConfiguration, nameof(cryptoConfiguration)); Guard.NotNull(entityIdManager, nameof(entityIdManager)); this._cryptoConfiguration = cryptoConfiguration; this._entityIdManager = entityIdManager; }
public static string TryAddCollectionName <T>(this IEntityIdManager self, string idWithoutCollectionName) { if (string.IsNullOrWhiteSpace(idWithoutCollectionName)) { return(null); } return(self.AddCollectionName <T>(idWithoutCollectionName)); }
public CreateOrganizationRequestHandler(IAsyncDocumentSession session, IRequestContext context, IEntityIdManager entityIdManager) { Guard.NotNull(session, nameof(session)); Guard.NotNull(context, nameof(context)); Guard.NotNull(entityIdManager, nameof(entityIdManager)); this._session = session; this._context = context; this._entityIdManager = entityIdManager; }
public RegisterUserRequestHandler(IDocumentStore store, IAsyncDocumentSession session, IEntityIdManager entityIdManager) { Guard.NotNull(store, nameof(store)); Guard.NotNull(session, nameof(session)); Guard.NotNull(entityIdManager, nameof(entityIdManager)); this._store = store; this._session = session; this._entityIdManager = entityIdManager; }
public TrimCollectionNameFromIdConverter(IEntityIdManager entityIdManager) { this._entityIdManager = entityIdManager; }
public AuthToken(string token, IEntityIdManager entityIdManager) : base(token) { this._entityIdManager = entityIdManager; }
private static AuthToken ParseAuthorizationHeader(string authorizationHeader, IEntityIdManager entityIdManager) { if (string.IsNullOrWhiteSpace(authorizationHeader)) { return(null); } var parts = authorizationHeader.Split(' '); if (parts.Length != 2) { return(null); } if (string.Equals(parts[0], "Bearer", StringComparison.OrdinalIgnoreCase) == false) { return(null); } try { return(new AuthToken(parts[1], entityIdManager)); } catch (Exception) { return(null); } }