/// <summary>
        /// Adds the claims transformation middleware to the OWIN pipeline.
        /// </summary>
        /// <param name="app">The application.</param>
        /// <param name="options">The options.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">options</exception>
        public static IAppBuilder UseClaimsTransformation(this IAppBuilder app, ClaimsTransformationOptions options)
        {
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            app.Use<ClaimsTransformationMiddleware>(options);
            return app;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ClaimsTransformationMiddleware"/> class.
 /// </summary>
 /// <param name="next">The next middleware.</param>
 /// <param name="options">The options.</param>
 public ClaimsTransformationMiddleware(AppFunc next, ClaimsTransformationOptions options)
 {
     _next    = next;
     _options = options;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ClaimsTransformationMiddleware"/> class.
 /// </summary>
 /// <param name="next">The next middleware.</param>
 /// <param name="options">The options.</param>
 public ClaimsTransformationMiddleware(AppFunc next, ClaimsTransformationOptions options)
 {
     _next = next;
     _options = options;
 }