ASP.NET 5 JWT Bearer Token Flow -
i know there lot of other questions nothing has answered query yet beta4 or higher of asp.net 5.
what want method of
jwt generation , jwt consumption in asp.net 5.
no oauth2 flow, have identityserverv3 working oauth2 overkill single app accessing api when own both sides.
the main source of difficulty having finding out equivalent of microsoft.owin.security.jwt in asp.net 5. nothing in list https://www.myget.org/gallery/aspnetvnext seems relate. or package stay relevant in vnext?
if you're looking (simple) way generate own jwt tokens, should directly use jwtsecuritytokenhandler. can find in system.identitymodel.tokens package on myget repository mentioned (but version bit old now) or directly on azure ad repository, in system.identitymodel.tokens.jwt package: https://www.myget.org/gallery/azureadwebstacknightly
of course, using standard protocol issue , retrieve jwt tokens more recommended , oauth2 , openid connect best candidates that.
note identityserver not server works on asp.net 5. i'm working on advanced fork of oauth2 authorization server middleware comes katana 3 , offers different approach: https://github.com/aspnet-contrib/aspnet.security.openidconnect.server
app.useoauthbearerauthentication(new jwtbeareroptions { automaticauthenticate = true, automaticchallenge = true, audience = "http://localhost:54540/", authority = "http://localhost:54540/" }); app.useopenidconnectserver(options => { options.provider = new authorizationprovider(); }); to learn more project, i'd recommend reading http://kevinchalet.com/2016/07/13/creating-your-own-openid-connect-server-with-asos-introduction/.
feel free ping me on https://jabbr.net/#/rooms/aspnetcore if need more information.
Comments
Post a Comment