예제 #1
0
def clean():
    """
    Remove expired tokens and authorization codes.
    """
    from canaille.ldap_backend.backend import (
        setup_backend,
        teardown_backend,
    )

    setup_backend(current_app)

    for t in Token.filter():
        if t.is_expired():
            t.delete()

    for a in AuthorizationCode.filter():
        if a.is_expired():
            a.delete()

    teardown_backend(current_app)
예제 #2
0
파일: tokens.py 프로젝트: yaal-fr/canaille
def index(user):
    tokens = Token.filter()
    return render_template("oidc/admin/token_list.html",
                           tokens=tokens,
                           menuitem="admin")