Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

OAuthBearerAuthenticationHandler does not call SecurityTokenValidated #207

Closed
@mdekrey

Description

@mdekrey

It looks like OAuthBearerAuthenticationHandler doesn't call the SecurityTokenValidated handler in the Options.Notifications.

In addition, logic goes on to use securityTokenReceivedNotification - securityTokenValidatedNotification is not checked after being instantiated, but is used once, hiding it from any Treat Warnings as Errors flags.

Starting with line 133:

var securityTokenValidatedNotification = new SecurityTokenValidatedNotification<HttpContext, OAuthBearerAuthenticationOptions>(Context, Options)
{
    ProtocolMessage = Context,
    AuthenticationTicket = ticket
};

// The following line is missing from source
await Options.Notifications.SecurityTokenValidated(securityTokenValidatedNotification);
if (securityTokenReceivedNotification.HandledResponse)
{
    return securityTokenValidatedNotification.AuthenticationTicket;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions