Structure JavaScript Code Using Modules

Introduction Most people (including myself) start out writing JavaScript code by adding function after function into a .js or HTML file. This can get job done but same time can quickly get out of control when working with a lot of code. Without having proper structure, maintaining such code bases, can be a nightmare and … Read more

Token Based Security: Angular Applications – Part 3

Introduction In previous post of this series, we configured our Angular application as a client of IdnentityServer and completed the login/logout process. However even though user was logged-in, the REST API calls were still not authorized: In this post, we will authorize HTTP calls by passing bearer token as an Authorization Header. Now, if you … Read more

Token Based Security: Angular Applications – Part 2

Introduction In previous post, on the topic of Token Based Security, we created an API endpoint and protect it (using Authorize attribute) with IdentityServer. Then we setup a simple Angular application with an AuthService to use oidc-client library. We also created few angular components and at the end of previous post, we created two buttons … Read more

Token Based Security: Angular Applications

Introduction I have written few posts on token based security, its importance, OAUTH, OIDC and IdentityServer. You can check previous post if you are new to these topics. Today, I will write about how to secure angular application with these technologies. We will see how to wire Angular application with IdentityServer. Angular application is a … Read more

TokenBased Security, OAUTH, OIDC, IdentityServer – Part 4

Introduction In previous post of this series, we setup IdentityServer with some test users and clients configurations. We then used postman tool to get the access token with couple of different flows. In this post, we will move forward and add a resource API to our solution. This will be simple .NET Core WebAPI application. … Read more

Token Based Security, OAuth , OIDC and IdentityServer4 – Part 3

Client Credentials and Resource Owner Password Flow Introduction In the previous post in this series, we discussed token based security, OAuth and OIDC. We also configured IdentityServer4 with some configurations. In this post, we will continue configuring IdentityServer4 and will also learn some of the client/server communication following OIDC flows. If you are new to … Read more

AWS Applications Deployment Basics – Part 2 (Setup NGINX)

Introduction In the previous post of this series “AWS Application Deployment Basics”, we setup a PostgreSQL database and then we connect to it via a Nodejs application. However, the Nodejs application is running on the same machine and database access is local for it. It is a totally valid setup and because it is on … Read more

AWS Applications Deployment Basics – Part 1 (VPC and PostgreSQL Setup)

Introduction In this series about deploying applications in AWS, I will discuss different methods and steps required to run different applications in AWS. We will be covering different moving parts in AWS as needed to run typical applications. This series will be arranged in different parts to discuss different services, topics and/or technologies needed for … Read more

Node Dependency Management (Part2)

Introduction In my previous post about Nodejs – Dependency Management, we looked at basics of what is Nodejs module. How can we use module.exports and require to work with dependencies. How folder dependencies work and why they are useful. We all look at how Nodejs lookup system works to look for dependencies and some basics … Read more

Structure JavaScript Code

Introduction Modern JavaScript frameworks like Angular, Vue etc have built-in mechanism to structure JavaScript code. When not using these frameworks, we can use simple techniques to structure our JavaScript. In this post I will show you one of them using Revealing module pattern. This pattern is very popular and there are great many resources online … Read more