auth0 / auth0-servicestack-oauthprovider

Auth0 OAuthProvider for ServiceStack
MIT License
0 stars 2 forks source link

Ability to validate tokens like the WebApi Implementation #1

Open svantreeck opened 9 years ago

svantreeck commented 9 years ago

It would be great to be able to validate tokens like the webapi-jsonwebtoken project within servicestack instead of relying on it to authenticate the user to auth0. This would enable a Javascript frontend like angular to pass its token to servicestack and allow it to be the backing api.

I'm not sure if this is the appropriate project or if you'd want a separate implementation for JWT processing, but I have code in a gist at https://gist.github.com/svantreeck/436f6ddddda38c735c62 that I had modified from the WebApi project to work within servicestack

To enable within servicestack, you'd do:

    Plugins.Add(new AuthFeature(() => new AuthUserSession(),
        new IAuthProvider[] { 
            new JsonWebTokenAuthProvider("Auth0 Client Secret", "Auth0 Client ID"), 
        }));
jerriep commented 6 years ago

@svantreeck Is this still relevant?