diff --git a/etc/blog.md b/etc/blog.md
index 0b14a3f..8bb4834 100644
--- a/etc/blog.md
+++ b/etc/blog.md
@@ -1,6 +1,6 @@
## Table of contents:
1. Introduction
-2. Ajax authentication
+2. Ajax authentication
### Introduction
@@ -9,7 +9,7 @@ Following are two scenarios that we'll implement in this tutorial:
1. Ajax Authentication
2. JWT Token Authentication
-### Prerequisites
+### PRE-requisites
Please check out the sample code/project from the following GitHub repository: https://github.com/svlada/springboot-security-jwt before you proceed.
@@ -45,7 +45,7 @@ Overall project structure is shown below:
### Ajax authentication
-By default Spring Security has a number of authentication filter implementations. Some of these filters are enabled by default. However support for Ajax authentication is not available out of the box. In the first part of this tutorial we will implement Ajax authentication by following standard patterns found in Spring Security framework.
+Spring Security has a number of authentication filter implementations. Some of these filters are enabled by default. However support for Ajax authentication is not available out of the box. In the first part of this tutorial we'll implement Ajax authentication by following standard patterns found in Spring Security framework.
When we talk about Ajax authentication we usually refer to process where user is supplying credentials through JSON payload sent as a part of XMLHttpRequest.
@@ -115,7 +115,7 @@ JWT Access Token can be used for authentication and authorization:
1. Authentication is performed by verifying JWT Access Token signature. If signature proves to be valid, access to requested API resource is granted.
2. Authorization is done by looking up privileges found in **scope** attribute of JWT Access Token.
-Decoded JWT Access Token has three parts: Header, Claims and Signature as shown below:
+Decoded JWT Access token has three parts: Header, Claims and Signature as shown below:
Header
```
@@ -146,12 +146,21 @@ Signature (base64 encoded)
**JWT Refresh Token**
-JWT Refresh Token is used for requesting new Access Tokens.
+Refresh token is used for requesting new Access tokens. Refresh token is long lived token and it's expiration time is greater than expiration time of Access token.
+I have added ```jti``` claim to the Refresh token. JWT ID(```jti```) claim is defined by [RFC7519](https://tools.ietf.org/html/rfc7519#section-4.1.7) with purpose to uniquely identify individual Refresh tokens. In this tutorial we'll use ```jti``` claim to maintain list of blacklisted or revoked tokens.
+
+Decoded Refresh token has three parts: Header, Claims and Signature as shown below:
+
+Header
+```
{
"alg": "HS512"
}
+```
+Claims
+```
{
"sub": "svlada@gmail.com",
"scopes": [
@@ -162,16 +171,13 @@ JWT Refresh Token is used for requesting new Access Tokens.
"iat": 1472033308,
"exp": 1472036908
}
+```
Signature (base64 encoded)
```
SEEG60YRznBB2O7Gn_5X6YbRmyB3ml4hnpSOxqkwQUFtqA6MZo7_n2Am2QhTJBJA1Ygv74F2IxiLv0urxGLQjg
```
-
-
-Let's dive into implementation details.
-
#### AjaxLoginProcessingFilter
AbstractAuthenticationProcessingFilter class is responsible for processing of HTTP-based authentication requests. Please note that AuthenticationManager must be set for this class.