Search Results for

    Show / Hide Table of Contents

    Class JwtRevocationMiddleware

    abstract class for implementing a jwt revocation middleware

    Inheritance
    object
    JwtRevocationMiddleware
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: FastEndpoints.Security
    Assembly: FastEndpoints.Security.dll
    Syntax
    public abstract class JwtRevocationMiddleware

    Constructors

    JwtRevocationMiddleware(RequestDelegate)

    abstract class for implementing a jwt revocation middleware

    Declaration
    protected JwtRevocationMiddleware(RequestDelegate next)
    Parameters
    Type Name Description
    RequestDelegate next

    the next request delegate to execute

    Methods

    Invoke(HttpContext)

    Declaration
    public Task Invoke(HttpContext ctx)
    Parameters
    Type Name Description
    HttpContext ctx
    Returns
    Type Description
    Task

    JwtTokenIsValidAsync(string, CancellationToken)

    implement this method and return whether the supplied jwt token is still valid or not.

    Declaration
    protected abstract Task<bool> JwtTokenIsValidAsync(string jwtToken, CancellationToken ct)
    Parameters
    Type Name Description
    string jwtToken

    the jwt token that should be checked against a blacklist.

    CancellationToken ct

    cancellation token

    Returns
    Type Description
    Task<bool>

    true if the token is valid

    SendTokenRevokedResponseAsync(HttpContext, CancellationToken)

    override this method in order to customize the unauthorized response that is sent when the jwt token is no longer valid.

    Declaration
    protected virtual Task SendTokenRevokedResponseAsync(HttpContext ctx, CancellationToken ct)
    Parameters
    Type Name Description
    HttpContext ctx

    the http context

    CancellationToken ct

    cancellation token

    Returns
    Type Description
    Task
    In this article
    Back to top Developed by Đĵ ΝιΓΞΗΛψΚ and contributors / Licensed under MIT / Website generated by DocFX