Token Based Authentication in ASP.Net using JWTs Part 2: Using Refresh Tokens

In Part 1 we setup basic token authentication using JWT’s with asp.net.  Things are setup reasonably but all is not well.  As a developer, you could give the token a lifespan of 30 days and just force the user to re-login after those days but what if you make the user inactive and don’t want him to login anymore?  There must be better way.AJ

Generally, I token has a lifetime of about an hour and when it expires, we want to refresh that token, verifying that the user still has access to the system, etc.  The method that this is handled is using refresh tokens.  A refresh token is returned along with the normal token and it’s stored for when we must refresh normal token.

Starting from our previous app, let’s support refresh tokens.  Note, the completed code for this blog can be found here.

This will require us to track refresh tokens in our database, so first, let’s create the RefreshToken model.

Continue reading “Token Based Authentication in ASP.Net using JWTs Part 2: Using Refresh Tokens”

Ask Arturo: Help! I Don’t Like My New Job

Dear Arturo,

I think I just made a huge mistake. I quit my previous job because a new opportunity came up, but this new position is not at all what I signed up for…what are my options?

John

This is a great question. People nowadays bounce around from job to job more frequently than they did 10, 20 years ago. In light of this fact it only makes sense that a person might find themselves in position that they’re unhappy with. Sure, we all have had a boring job before, but most of which we are able to “stick out “until we find something else. Every once in a while though we wind up in a position that turns out to be terrible fit. Is this an accurate description of your situation? If so, continue reading! Continue reading “Ask Arturo: Help! I Don’t Like My New Job”

Holiday Hackers are Hard at Work: Ways to Protect Yourself On National Computer Security Day

Holiday Hackers are Hard at Work: Ways to Protect Yourself On National Computer Security Day

By Patrick Tiettmeyer

The holidays are a time where memories are made with family and friends. It’s a time when we surf the internet to see photos of children with Santa, dogs wearing antlers, and recipes for eggnog. It’s a time when people take to e-commerce websites to shop, using their credit cards and bank accounts, trusting the sites to be secure.

And for the most part, they are: Companies worldwide focus millions of dollars and thousands of hours, annually, on their security and yet they still face threats and breaches. There are some issues we simply cannot control. What we can control is the safety of our own personal computers.  Continue reading “Holiday Hackers are Hard at Work: Ways to Protect Yourself On National Computer Security Day”

How Data Analysis is Taking Over the World

How Data Analysis is Taking Over the World

By Chris Douglas

It’s Cyber Monday, but before you dive into online shopping on company time ahem, let’s explore some information about data.

tenor

No…not THAT Data… You know, data – the information that’s gathered and reported whether you realize it or not. The amount of data being collected is out of this world! And it keeps growing. A study was done by Dun & Bradstreet and Forbes Insights regarding the current state of data analytics adoption from over 300 executives in North America, U.K. and Ireland. Several different industries were a part of it, and it seems the landscape has shifted pretty heavily over the past several years. Continue reading “How Data Analysis is Taking Over the World”

Token Based Authentication in ASP.Net using JWTs Part 1

AJLately, I’ve been doing quite a bit of front-end development with the latest version of Angular and that requires token based authentication. So in this article let’s discuss how to create tokens in .Net.  I’ll go over setting up tokens in regular .Net, and in a later article, I’ll discuss how to setup tokens in .Net core.

All of the code can be obtained from Github Here.

Continue reading “Token Based Authentication in ASP.Net using JWTs Part 1”

The IBS Longtimers: An Interview with Jeff Jorgensen

The IBS Longtimers: An Interview with Jeff Jorgensen

Jeff Jorgensen has been a valuable member of the IBS family since 2001. Starting out as the Cincinnati branch manager and working his way to becoming President of the company in 2015, Jeff is responsible for much of IBS’ success. We sat down with him to learn more about his experience at IBS and to find out what he’s like outside of the office.

 

Where did you go to college and what did you study?

I went to Kent State University and double majored in Accounting and Finance. When I had to depreciate a leased asset, I realized that I may need to do something other than accounting!

Continue reading “The IBS Longtimers: An Interview with Jeff Jorgensen”

Evaluating HTML5/Angular Data Grid

misc1I’m implementing sorting, filtering, and grouping for a data set to allow business users to look at information in various ways for more comprehensive data analysis. By using a pre-built component, time is saved by reducing development time for implementing the feature.  This is replaced by configuring and adding logic for the grid to work. I tried out a few different data grids to see how they might meet my needs:

UI-grid

  • Control selected/displayed columns
    • Must manually load / save user selected columns (implemented on other tables)
  • Column Filtering
    • If we limit the result set and do NOT use pagination, then we can use filters inside the grid:
      • Supports less-than and greater-than — need to be in separate inputs
      • Dates need to be typed in by hand (and need to specify format) or create a custom date filter
  • Saving/Loading Filters     
    • The filters store the column data like “grid.column[i].filters[0]” so it would be pretty easy to store that data to a database and then pre-populate back
  • Exporting
  • Pagination
    • Painful but possible with the filters and just passing them to the server and handling them individually
  • Printing
    • Export to pdf and print


Dev Express Grid

  • Control selected/displayed columns
    • This will be a manual process as well (combining this with the ‘visible’ properties on the columns)
  • Column Filtering
    • Again, we would want to NOT use pagination and just limit the result set
    • Contains built-in equality operators
  • Saving/Loading Filters
    • I’m having difficulty finding out how to do this.  It seems that this is close
  • Exporting
  • Pagination
    • They only have simple pagination samples, none containing filters
  • Printing
    • Export to excel and print
    • Export to pdf on server (or client)

Telerik KendoUI DataGrid

Note: although this seems like a fully-functional datagrid, it’s hard to find examples for angularjs.  It seems most are plain javascript.

  • Control Selected/Displayed columns
    • Must be handled manually (like all others)
  • Column Filtering
  • Saving/loading filters
  • Exporting:
    • Exports to PDF
    • Exports to Excel
  • Pagination
    • They only have simple pagination samples, none containing filters
  • Printing
    • Export to pdf and open then print

 

Printing seems to be the biggest issue across all three of these data grids. UI-Grid can do CSV and pdf in Chrome, DevX Grid can do Excel only). Up next, I’m looking to do the following: