GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - d3rrick/Jwt-SpringBoot

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
.mvn/wrapper
.mvn/wrapper
 
 
src
src
 
 
.gitignore
.gitignore
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
mvnw
mvnw
 
 
mvnw.cmd
mvnw.cmd
 
 
pom.xml
pom.xml
 
 

Repository files navigation

Jwt-SpringBoot

Implementing JWT authentication with spring boot.

Normally you would create an endpoint to create the credentials(token),

then this token is passed to other requests in the headers(Authorization: Bearer {token})

  • Step 1.
    • create token:
      • url -> localhost:8080/auth/generate
      • There needs to be a user in the backened from db,oauth,azure,aws etc, so the user details is then passed e.g (username, password)
      • {"username":"user","password":"5H5_ECC@F][^gtQeu:d,&$sAx>,+EN"}
        • response. has the jwt token to he passed to other requests.
          • {"access_token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjQyODU0NjY0LCJleHAiOjE2NDI4NTUyNjR9.gD04xuNKVsvZX1DrvTNKDArL3RzcSSmKVRltiQNuLcw","expires_in": 600000}
  • Step 2.
    • Pass the token in headers on req 2. localhost:8080/greet/
      • headers Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjQyODU0NjY0LCJleHAiOjE2NDI4NTUyNjR9.gD04xuNKVsvZX1DrvTNKDArL3RzcSSmKVRltiQNuLcw

Next steps

  • Add exception handlers

© Copyright 2022 @derrick.

About

No description, website, or topics provided.

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.