Base solution for your next web application
Open Closed

JWT (JSON Web Tokens) for Asp.Mvc (NOT asp net boilerplate ) #4517


User avatar
0
etender created

Hi. Do you have JWT (JSON Web Tokens) for Asp.Mvc + angular implementation. I saw you have it for asp net boilerplate CORE Thanks


10 Answer(s)
  • User Avatar
    0
    alirizaadiyahsi created

    Hi @Etender, I think you mean ASP.NET MVC 5.x / Angularjs 1.x. If so, there is Bearer Token Authentication in this project.

    <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Zero/Startup-Template#token-based-authentication">https://aspnetboilerplate.com/Pages/Doc ... entication</a>

  • User Avatar
    0
    etender created

    Is bearer token supports JWT ?

  • User Avatar
    0
    alirizaadiyahsi created

    Bearer token and JWT are different authentication methods. Check this : <a class="postlink" href="https://stackoverflow.com/questions/42086149/asp-net-identity-bearer-token-vs-jwt-pros-and-cons">https://stackoverflow.com/questions/420 ... s-and-cons</a>

  • User Avatar
    0
    etender created

    But what about JWT ? I need JWT exectly

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    ASP.NET Core & Angular app uses JwtTokenMiddleware. How do you want to use it ? Can you explain ?

  • User Avatar
    0
    etender created

    Yes I want to use JWT token for Asp.Mvc + angular app (not Core)

  • User Avatar
    0
    ismcagdas created
    Support Team

    @Etender sorry, my bad.

    ASP.NET MVC 5.x & AngularJs version doesn't support JWT becasue AngularJS views are designed as cshtml files and they are hosted in the application itself.

  • User Avatar
    0
    etender created

    Coul you give me instructions - how to implement JWT token Authorization to ASP.NET MVC 5.x / Angularjs 1.x and Zero (NOT Core)

    ??

  • User Avatar
    0
    etender created

    Or just maybe you can give me instructions how to create my custom token format? I cant find out where should I inject my implementation ?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I haven't tried this but this topic seems to be working <a class="postlink" href="https://stackoverflow.com/questions/29791499/how-to-use-jwt-in-mvc-application-for-authentication-and-authorization">https://stackoverflow.com/questions/297 ... horization</a>.