Remove unnecessary exceptions file and more clean up

This commit is contained in:
Matt Wright
2012-08-23 20:39:43 -04:00
parent 6322b4cbe1
commit bdf61b146c
2 changed files with 0 additions and 53 deletions
-52
View File
@@ -1,52 +0,0 @@
# -*- coding: utf-8 -*-
"""
flask.ext.security.exceptions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Flask-Security exceptions module
:copyright: (c) 2012 by Matt Wright.
:license: MIT, see LICENSE for more details.
"""
class SecurityError(Exception):
def __init__(self, message=None, user=None):
super(SecurityError, self).__init__(message)
self.user = user
class BadCredentialsError(SecurityError):
"""Raised when an authentication attempt fails due to an error with the
provided credentials.
"""
class UserNotFoundError(SecurityError):
"""Raised by a user datastore when there is an attempt to find a user by
their identifier, often username or email, and the user is not found.
"""
class RoleNotFoundError(SecurityError):
"""Raised by a user datastore when there is an attempt to find a role and
the role cannot be found.
"""
class ConfirmationError(SecurityError):
"""Raised when an confirmation error occurs
"""
class ResetPasswordError(SecurityError):
"""Raised when a password reset error occurs
"""
class PasswordlessLoginError(SecurityError):
"""Raised when a passwordless login error occurs
"""
def __init__(self, message=None, user=None, next=None):
super(PasswordlessLoginError, self).__init__(message, user)
self.next = next
-1
View File
@@ -257,7 +257,6 @@ def create_blueprint(state, import_name):
methods=['GET', 'POST'],
endpoint='login')(send_login)
bp.route(state.login_url + '/<token>',
methods=['GET'],
endpoint='token_login')(token_login)
else:
bp.route(state.login_url,