public UserClaimsService(AlloyContext context, IMemoryCache cache, ClaimsTransformationOptions options, IS3PlayerApiClient s3PlayerApiClient) { _context = context; _options = options; _cache = cache; _s3PlayerApiClient = s3PlayerApiClient; }
public static IAppBuilder UseClaimsTransformation(this IAppBuilder app, ClaimsTransformationOptions options) { if (options == null) { throw new ArgumentNullException("options"); } app.Use(typeof(ClaimsTransformationMiddleware), options); return(app); }
/// <summary> /// Adds the <see cref="ClaimsTransformationMiddleware"/> middleware to the specified <see cref="IApplicationBuilder"/>, which enables claims transformation capabilities. /// </summary> /// <param name="app">The <see cref="IApplicationBuilder"/> to add the middleware to.</param> /// <param name="configureOptions">An action delegate to configure the provided <see cref="ClaimsTransformationOptions"/>.</param> /// <returns>A reference to this instance after the operation has completed.</returns> public static IApplicationBuilder UseClaimsTransformation(this IApplicationBuilder app, Action <ClaimsTransformationOptions> configureOptions) { var options = new ClaimsTransformationOptions(); if (configureOptions != null) { configureOptions(options); } return(app.UseClaimsTransformation(options)); }
/// <summary> /// Adds the <see cref="ClaimsTransformationMiddleware"/> middleware to the specified <see cref="IApplicationBuilder"/>, which enables claims transformation capabilities. /// </summary> /// <param name="app">The <see cref="IApplicationBuilder"/> to add the middleware to.</param> /// <param name="transform">A function that asynchronously transforms one <see cref="ClaimsPrincipal"/> to another.</param> /// <returns>A reference to this instance after the operation has completed.</returns> public static IApplicationBuilder UseClaimsTransformation(this IApplicationBuilder app, Func <ClaimsPrincipal, Task <ClaimsPrincipal> > transform) { var options = new ClaimsTransformationOptions(); options.Transformer = new ClaimsTransformer { OnTransform = transform }; return(app.UseClaimsTransformation(options)); }
public UserClaimsService(PlayerContext context, IMemoryCache cache, ClaimsTransformationOptions options, IMapper mapper) { _context = context; _options = options; _cache = cache; _mapper = mapper; }
/// <summary> /// Adds the <see cref="ClaimsTransformationMiddleware"/> middleware to the specified <see cref="IApplicationBuilder"/>, which enables claims transformation capabilities. /// </summary> /// <param name="app">The <see cref="IApplicationBuilder"/> to add the middleware to.</param> /// <param name="options">A <see cref="ClaimsTransformationOptions"/> that specifies options for the middleware.</param> /// <returns>A reference to this instance after the operation has completed.</returns> public static IApplicationBuilder UseClaimsTransformation(this IApplicationBuilder app, ClaimsTransformationOptions options) { return(app.UseMiddleware <ClaimsTransformationMiddleware>(options)); }
public UserClaimsService(SteamfitterContext context, IMemoryCache cache, ClaimsTransformationOptions options) { _context = context; _options = options; _cache = cache; }
public ClaimsTransformationMiddleware(Func <IDictionary <string, object>, Task> next, ClaimsTransformationOptions options) { _next = next; _options = options; }