I have written a custom oauth provider which allows me to issue JWT.
It doesn't matter if am using oauth/ the membership2.0 system , as long as the provider issues a valid signed JWT token
I should be able to use
public void ConfigureOAuth(IAppBuilder app) { var issuer = "http://localhost:60118/oauth/token"; var audience = "414e1927a3884f68abc79f7283837fd1"; var secret = TextEncodings.Base64Url.Decode("qMCdFDQuF23RV1Y-1Gq9L3cF3VmuFwVbam4fMTdAfpo"); // Api controllers with an [Authorize] attribute will be validated with JWT app.UseJwtBearerAuthentication( new JwtBearerAuthenticationOptions { AuthenticationMode = AuthenticationMode.Active, AllowedAudiences = new[] { audience }, IssuerSecurityTokenProviders = new IIssuerSecurityTokenProvider[] { new SymmetricKeyIssuerSecurityTokenProvider(issuer, secret) }, Provider = new OAuthBearerAuthenticationProvider() { } }); }
to authenticate right?
It doesn't seem to work as it doesn't hit any of the break points set in the login provider.
I know the provider works properly since am able to get a token when I call the api via console client test app I wrote.