/// <summary>
        /// Constructor de la clase
        /// </summary>
        /// <param name="context"></param>
        /// <param name="authenticationOptions"></param>
        /// <param name="state"></param>
        /// <param name="user"></param>
        /// <param name="accessToken"></param>
        /// <param name="refreshToken"></param>
        public IsssteTramitesContext(IOwinContext context, IsssteTramitesAuthenticationOptions authenticationOptions, string state, IsssteUser user, string accessToken, string refreshToken)
            : base(context)
        {
            this.AuthenticationOptions    = authenticationOptions;
            this.AuthenticationProperties = this.AuthenticationOptions.StateDataFormat.Unprotect(state);
            this.User         = user;
            this.AccessToken  = accessToken;
            this.RefreshToken = refreshToken;

            this.AuthenticationProperties.Dictionary.Add("ExternalAccessToken", this.AccessToken);
            this.AuthenticationProperties.Dictionary.Add("ExternalRefreshToken", this.RefreshToken);
        }
Пример #2
0
 /// <summary>
 /// Agrega al pipeline de procesamiento de Owin la utenticación mediante el sistema de seguridad del ISSSTE
 /// </summary>
 /// <param name="app">Applicación Owin</param>
 /// <param name="options">Opciones de autenticación</param>
 /// <returns>Aplicación Owin</returns>
 public static IAppBuilder UseIsssteTramitesAuthentication(this IAppBuilder app, IsssteTramitesAuthenticationOptions options)
 {
     return(app.Use(typeof(IsssteTramitesAuthenticationMiddleware), app, options));
 }