gcb_web_auth/utils.py
def remove_invalid_dukeds_tokens(user):
    """
    Examines a user's DukeDSAPITokens, removing any that are invalid JWTs (e.g. expired)
    :param user: a django User
    :return: None
    """
    for token in DukeDSAPIToken.objects.filter(user=user):
        try:
            check_jwt_token(token.key)
        except InvalidTokenError as e:
            token.delete()

    Examines a user's DukeDSAPITokens, removing any that are invalid JWTs (e.g. expired)
    :param user: a django User
    :return: None
    
Examines a user's DukeDSAPITokens, removing any that are invalid JWTs
Examines a user ' s DukeDSAPITokens removing any that are invalid JWTs
def remove_invalid_dukeds_tokens(user):
    for token in DukeDSAPIToken.objects.filter(user=user):
        try:
            check_jwt_token(token.key)
        except InvalidTokenError as e:
            token.delete()
def remove_invalid_dukeds_tokens ( user ) : for token in DukeDSAPIToken . objects . filter ( user = user ) : try : check_jwt_token ( token . key ) except InvalidTokenError as e : token . delete ( )
Examines a user's DukeDSAPITokens, removing any that are invalid JWTs (e.g.
Examines a user ' s DukeDSAPITokens removing any that are invalid JWTs ( e . g .
"""
    Examines a user's DukeDSAPITokens, removing any that are invalid JWTs (e.g. expired)
    :param user: a django User
    :return: None
    """
None
user
a django User
a django User