Skip to content

LegacyOAuthSecurityTokenHandler - Expired Token #3

@RedBlack-DevOps

Description

@RedBlack-DevOps

Hi

We had an issue with the example LegacyOAuthSecurityTokenHandler and it not checking for Expired tokens. We changed it to the below which resolved the issue for us.

            var ticket = LegacyOAuthSecurityTokenHelper.GetTicket(token, _options);

            if (ticket.Properties.ExpiresUtc < DateTime.UtcNow)
                throw new SecurityTokenExpiredException();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions