Package coprs :: Package views :: Module misc
[hide private]
[frames] | no frames]

Module misc

source code

Functions [hide private]
 
create_user_wrapper(username, email, timezone=None) source code
 
fed_raw_name(oidname) source code
 
krb_straighten_username(krb_remote_user) source code
 
set_empty_user() source code
 
lookup_current_user() source code
 
page_not_found(message) source code
 
access_restricted(message) source code
 
generic_error(message, code=500, title=None)
:type message: str :type err: CoprHttpException
source code
 
krb5_login(name)
Handle the Kerberos authentication.
source code
 
login() source code
 
create_or_login(resp) source code
 
logout() source code
 
api_login_required(f) source code
 
krb5_login_redirect(next=None) source code
 
login_required(role=RoleEnum("user")) source code
 
backend_authenticated(f) source code
 
intranet_required(f) source code
 
req_with_copr(f) source code
 
send_build_icon(build) source code
Variables [hide private]
  server_error_handler = partial(generic_error, code= 500, title...
  bad_request_handler = partial(generic_error, code= 400, title=...
  misc = flask.Blueprint("misc", __name__)
Function Details [hide private]

set_empty_user()

source code 
Decorators:
  • @app.before_request

lookup_current_user()

source code 
Decorators:
  • @app.before_request

krb5_login(name)

source code 

Handle the Kerberos authentication.

Note that if we are able to get here, either the user is authenticated correctly, or apache is mis-configured and it does not perform KRB authentication at all. Note also, even if that can be considered ugly, we are reusing oid's get_next_url feature with kerberos login.

Decorators:
  • @misc.route(app.config ['KRB5_LOGIN_BASEURI']+ "/", methods= ["GET"])

login()

source code 
Decorators:
  • @misc.route("/login/", methods= ["GET"])
  • @oid.loginhandler

create_or_login(resp)

source code 
Decorators:
  • @oid.after_login

logout()

source code 
Decorators:
  • @misc.route("/logout/")

Variables Details [hide private]

server_error_handler

Value:
partial(generic_error, code= 500, title= "Internal Server Error")

bad_request_handler

Value:
partial(generic_error, code= 400, title= "Bad Request")