Skip to content

non static V2 functions throws error when using AddAuthentication() in functionstartup #4485

@AnunnakiSelva

Description

@AnunnakiSelva

Is your question related to a specific version? If so, please specify:

Azure function v2 . .net core 2.2

What language does your question apply to? (e.g. C#, JavaScript, Java, All)

C#

Question

Am trying to implement custom token authentication with auth server . So i have used builder.Services.AddAuthenticatio in the FunctionStartUp, Am able to compile it . But while running in the local with the emulator.

When i call Http trigger functions am getting following error .

An unhandled host error has occurred.
Microsoft.AspNetCore.Authentication.Core: No authentication handler is registered for the scheme 'WebJobsAuthLevel'. The registered schemes are: BearerIdentityServerAuthenticationJwt, BearerIdentityServerAuthenticationIntrospection, Bearer. Did you forget to call AddAuthentication().AddSomeAuthHandler?.

Can some one help me on this please ???

Does azure functions support middlewares with the latest release ?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions