public PasswordResetController(IPasswordResetManager passwordResetManager, ISecurityModule securityModule)
            : base(securityModule)
        {
            this.PasswordResetManager = passwordResetManager;

            this.Post("password-resets/{email}", args => this.Create());
            this.Get("password-resets/{token}", args => this.Get());
            this.Put("password-resets/{token}", args => this.Use());
        }
Example #2
0
        public AuthController(IAuthManager authManager, ISecurityModule securityModule)
            : base(securityModule)
        {
            this.AuthManager = authManager;

            this.Post("login", args => this.Login());
            this.Get("sessions", args => this.ListSessions());
            this.Get("sessions/current", args => this.GetCurrentSession());
            this.Delete("logout", args => this.Logout());
            this.Delete("logout/all", args => this.LogoutAllExceptCurrentSession());
        }
        public UserController(IUserManager userManager, ISecurityModule securityModule)
            : base(securityModule)
        {
            this.UserManager = userManager;

            this.Post("users", args => this.Create());
            this.Get("users", args => this.List());
            this.Patch("users/email-activate/{emailConfirmationToken}", args => this.ConfirmEmail());
            this.Get("users/email/{email}/exists", args => this.IsEmailAvailable());
            this.Get("users/{userKey}", args => this.Get());
            this.Put("users/{userKey}", args => this.Update());
        }
 public HomeController(ISecurityModule securityModule)
     : base(securityModule)
 {
     this.Get("", args => this.Home());
 }
Example #5
0
 public BaseController(ISecurityModule securityModule)
 {
     this.SecurityModule = securityModule;
 }