In my Pluralsight courses1 on ASP.NET Core, I show how to use JWT Tokens to secure your API. In building a new example for my upcoming Vue.js course, I decided to only use JWT (not cookies and JWT like many of my examples are).
But I kept getting redirects on failure to call an API made me realize that I wasn't sure how to make JWT the only provider. After some fiddling I figured it out. This blog post is mostly to remind me of how to do it.
Ok, please tell me how stupid this is. It's apt to be pretty stupid but I have a point to it. I'm trying to separate the ideas of prototyping quickly from preparing for production.
I've been using Bower to do examples of client-side dependencies. Bower is depreciated so for new dev, I don't want to recommend it (and VS2017 has removed it too). Bower is clean as you don't have to introduce a bunch of ideas like gulp or npm scripts to get someone with a working example quickly (Bower's .rc file let's you tell it where to put the dependencies). I want to do the same thing with NPM.
Orlando during Spring Break probably wasn't the best idea, but luckily I got to go to the Orlando Code camp instead of fighting people at Disney.
I had a good time talking with people about Vue.js. Great catching up with the other speakers and so many friendly faces among the attendees.
I've been digging into Vue.js a lot lately. I'm working on a new course on it that will be released on May 1st.
Coming from Angular and Angular.js, I was surprised to see that remote views were not supported out of the box. Now I'm not using it with Webpack or Browserfy, so I am probably using it outside the norm. But I still think remote views (or in the case of hosting in ASP.NET, generated views) are a powerful idea.
I'm getting around to this a little late, but late last month I had a great time presenting in Charlotte's Enterprise Developer's Guild. I showed them how ASP.NET Core 2 works.
They had a full house and I got to talk about how ASP.NET Core 2 and .NET Core itself works. Great questions about why bother with ASP.NET Core and how it's related to the new "Core" moniker that Microsoft seems to be putting on everything (answer is, probably no relation, just a marketing group that is latching on to the name).
When I created my Bootstrap 3 course back in 2013, I never thought it would take five years to get to the new version of Bootstrap 4. Back in 2016, I outlined and got ready to create a new course about Bootstrap 4. But it never came out. Until now.
I had always planned to do this course for Pluralsight, but they are changing some of the ways they want to publish content. So this is giving me the chance to promote some one-off courses that they don't have room for in my own course library. Bootstrap 4 is the first of these full-length courses.
I feel like the job of software developer in the last 20 years has been to decouple. Whether it's dependency injection or building modular systems, or even the new trend of micro-services; coupling has been the killer of everything good in software development (maybe).
In many small ways, I find that trying to fit in small disconnected sets of functionality into the ASP.NET MVC Controller to View mechanism can be overwhelming. In some cases I'll need something that is completely separate from the logic of the controller. Luckily ASP.NET Core comes to the rescue.
I made a decision early on to only make Pluralsight video courses so that I didn't have to worry about exclusivity of topics. They've made me very happy over the years. But I think it's time to stretch a little.
I'm getting back into face-to-face training. And I'm starting with a new workshop on ASP.NET Core 2 and Angular 5. If you're in Atlanta or can get here, I'll be doing a three-day workshop from May 16-18th this year.
Here's a little bit about the workshop:
Back in ASP.NET 4, I really liked the way that it supported running migrations and seeding of the database for you. But in ASP.NET Core and EF Core, that hasn't come to the table yet.
I doubt it actually needs to happen because since ASP.NET Core gives you much more control over the life cycle of the web project. In Entity Framework Core, I've been using an approach to run migrations and seed the database that I kind of crufted together in the Betas. I don't think it's working.
|Vue.js by Example (New Lower Price)|
|Bootstrap 4 by Example (New Lower Price)|
|Intro to Font Awesome 5 (Free Course)|
|Building an API with ASP.NET Core (New Course)|
|Building a Web App with ASP.NET Core, MVC6, EF Core, Bootstrap and Angular (updated for 2.2)|
|Less: Getting Started (New)|
|Using Visual Studio Code for ASP.NET Core Projects|
|Implementing ASP.NET Web API|
|Application Name||WilderBlog||Environment Name||Production|
|Application Ver||v4.0.30319||Runtime Framework||x86|
|App Path||D:\home\site\wwwroot\||Runtime Version||.NET Core 4.6.27617.04|
|Operating System||Microsoft Windows 10.0.14393||Runtime Arch||X86|