Token Based Authentication Using Spring Security

[vc_row full_width=”stretch_row” equal_height=”yes” bg_type=”bg_color” bg_override=”ex-full” bg_color_value=”#f3f6f9″ css=”.vc_custom_1588427211229{padding-top: 20px !important;padding-bottom: 20px !important;}”][vc_column][vc_row_inner][vc_column_inner width=”2/3″][vc_column_text]Today we wrapped up basic authentication of the application by wiring up Spring Security to work with JSON Web Tokens (JWT). As a part of this effort, we created the following 2 POST API end points.

  • /api/auth/signup – For registration end point

  • /api/auth/signin – For login

Through Spring Security, we configured CORS, CSRF, Session Management and also setup custom rules for protected resources. We used HS512 public key encryption technology to sign our keys. The keys are secured by applying a strong private signing key and will be used for communicating with secure backend end points

Also on the frontend, we will be adding a “Http Request” interceptor and that will inject the Bearer token with all the server side calls.[/vc_column_text][vc_column_text]

At BundleN, we experiment with stack combinations on our own time.
For potential clients interested in this stack, we can always give a demo of what we have up until that point of time. You can reach us at sales@BundleN.com

For more details on this stack, click here

Here is the latest about our Angular + Java project.[/vc_column_text][/vc_column_inner][vc_column_inner width=”1/3″][vc_single_image image=”433″ img_size=”full” style=”vc_box_shadow”][/vc_column_inner][/vc_row_inner][vc_row_inner equal_height=”yes” gap=”10″ css=”.vc_custom_1581938564294{padding-right: 15px !important;padding-left: 15px !important;}”][vc_column_inner el_class=”features” width=”1/2″][bsf-info-box icon=”dt-icon-the7-misc-017″ icon_size=”70″ icon_color=”#552c11″ title=”Signup end point” pos=”left” title_font_style=”font-weight:bold;” css_info_box=”.vc_custom_1588618092807{padding-top: 30px !important;}”]Task
Create API End Point for registering users

Sample Payload
{
“name”:”Cool Customer”,
“email”:”MyEmailAddress@BundleN.com”,
“password”:”FFZ$#1FFZWM”
}[/bsf-info-box][/vc_column_inner][vc_column_inner el_class=”features” width=”1/2″][bsf-info-box icon=”dt-icon-the7-misc-017″ icon_size=”70″ icon_color=”#552c11″ title=”Sign in end point” pos=”left” title_font_style=”font-weight:bold;” css_info_box=”.vc_custom_1588618131412{padding-top: 30px !important;}”]Task
Create API End Point for Logging In users

Sample Payload
{
“email”:”MyEmailAddress@BundleN.com”,
“password”:”FFZ$#1FFZWM”
}[/bsf-info-box][/vc_column_inner][/vc_row_inner][vc_row_inner equal_height=”yes” gap=”10″ css=”.vc_custom_1581938591262{padding-right: 15px !important;padding-left: 15px !important;}”][vc_column_inner el_class=”features” width=”1/2″][bsf-info-box icon=”dt-icon-the7-misc-017″ icon_size=”70″ icon_color=”#552c11″ title=”Some Development Stats” pos=”left” title_font_style=”font-weight:bold;” css_info_box=”.vc_custom_1588618713480{padding-top: 30px !important;}”]It is always fun to show some stats along the way.
We use Postman a lot for API testing. Over 10 million developers and over 500K companies using Postman’s comprehensive set of built-in tools to support every stage of the API lifecycle.

With couple API’s done, Here is a quick snapshot of the Postman tests we developed so far.

[/bsf-info-box][/vc_column_inner][vc_column_inner el_class=”features” width=”1/2″][bsf-info-box icon=”icomoon-the7-font-the7-sort-02″ icon_size=”70″ icon_color=”#552c11″ title=”What’s next?” pos=”left” title_font_style=”font-weight:bold;” css_info_box=”.vc_custom_1588617817363{padding-top: 30px !important;}”]

  • User Registration User Interface
  • Sign Up User Interface
  • Roles API End Point
  • Social Login using Google
  • Social Login using Facebook
  • Logout
  • Dashboard
  • Dashboard Widgets,…….

[/bsf-info-box][/vc_column_inner][/vc_row_inner][ultimate_spacer height=”48″ height_on_tabs=”24″ height_on_tabs_portrait=”32″ height_on_mob_landscape=”8″ height_on_mob=”16″][/vc_column][/vc_row][vc_row equal_height=”yes” bg_type=”image” parallax_style=”vcpb-default” bg_image_new=”id^73|url^https://dev.techreshape.com/marines/feb/atlas/wp-content/uploads/2020/01/contact-us124.png|caption^null|alt^null|title^contact-us124|description^null” bg_image_repeat=”no-repeat” bg_override=”ex-full” enable_overlay=”enable_overlay_value” overlay_color=”rgba(255,255,255,0.73)” css=”.vc_custom_1582001396087{padding-top: 35px !important;padding-bottom: 35px !important;}”][vc_column width=”5/12″][ultimate_heading main_heading=”Get In Touch” alignment=”left” main_heading_margin=”margin-bottom:20px;” main_heading_font_family=”font_family:Raleway|font_call:Raleway|variant:600″ main_heading_style=”font-weight:600;” main_heading_font_size=”desktop:40px;” main_heading_line_height=”desktop:50px;”][/ultimate_heading][bsf-info-box icon_type=”custom” icon_img=”id^51|url^https://bundlen.com/wp-content/uploads/2020/02/phone1.png|caption^null|alt^null|title^phone1|description^null” img_width=”55″ hover_effect=”style_2″ pos=”left”](615) 619-3000[/bsf-info-box][bsf-info-box icon_type=”custom” icon_img=”id^49|url^https://bundlen.com/wp-content/uploads/2020/02/email1.png|caption^null|alt^null|title^email1|description^null” img_width=”55″ hover_effect=”style_2″ pos=”left”]sales@BundleN.com

[/bsf-info-box][bsf-info-box icon_type=”custom” icon_img=”id^27|url^https://bundlen.com/wp-content/uploads/2020/02/time-1.png|caption^null|alt^null|title^time (1)|description^null” img_width=”55″ hover_effect=”style_2″ pos=”left”]Monday to Friday 7:00 am – 5:00 pm CST[/bsf-info-box][/vc_column][vc_column width=”7/12″][ultimate_heading main_heading=”Send Message” alignment=”left” main_heading_margin=”margin-bottom:20px;” main_heading_font_family=”font_family:Raleway|font_call:Raleway|variant:600″ main_heading_style=”font-weight:600;” main_heading_font_size=”desktop:40px;” main_heading_line_height=”desktop:50px;”][/ultimate_heading][contact-form-7 id=”117″][/vc_column][/vc_row]