コード例 #1
0
        public static IAppBuilder RequireScopes(this IAppBuilder app, params string[] scopes)
        {
            var options = new ScopeValidationOptions
            {
                Scopes = scopes,

                AllowAnonymousAccess = false,
                ScopeClaimType = "scope"
            };

            app.RequireScopes(options);
            return app;
        }
コード例 #2
0
 public ScopeValidationMiddleware(Func <IDictionary <string, object>, Task> next, ScopeValidationOptions options)
 {
     _next    = next;
     _options = options;
 }
コード例 #3
0
 public static IAppBuilder RequireScopes(this IAppBuilder app, ScopeValidationOptions options)
 {
     app.Use(typeof(ScopeValidationMiddleware), options);
     return app;
 }
コード例 #4
0
 public ScopeValidationMiddleware(Func<IDictionary<string, object>, Task> next, ScopeValidationOptions options)
 {
     _next = next;
     _options = options;
 }