mirror of
https://github.com/streetwriters/notesnook-sync-server.git
synced 2026-10-02 19:10:14 +02:00
api: refactor user subscription check for monograph embed & links
This commit is contained in:
1 parent
9860df2379
commit
cfe2875a67
4 files changed
+17
-78
No files matched your search
@@ -112,13 +112,7 @@ namespace Notesnook.API
|
||||
policy.RequireAuthenticatedUser();
|
||||
policy.Requirements.Add(new SyncRequirement());
|
||||
});
|
||||
options.AddPolicy("Pro", policy =>
|
||||
{
|
||||
policy.AuthenticationSchemes.Add("introspection");
|
||||
policy.RequireAuthenticatedUser();
|
||||
policy.Requirements.Add(new SyncRequirement());
|
||||
policy.Requirements.Add(new ProUserRequirement());
|
||||
});
|
||||
|
||||
options.AddPolicy(InboxApiKeyAuthenticationDefaults.AuthenticationScheme, policy =>
|
||||
{
|
||||
policy.AuthenticationSchemes.Add(InboxApiKeyAuthenticationDefaults.AuthenticationScheme);
|
||||
|
||||
Reference in new issue
Block a user