Socket
Socket
Sign inDemoInstall

github.com/solrac97gr/basic-jwt-auth

Package Overview
Dependencies
18
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/solrac97gr/basic-jwt-auth


Version published

Readme

Source

Basic JWT Auth

I create this repository as a simple example of how to use JWT in a Go Fiber project.

This repository come with a explanation of how to use JWT in a Fiber project in my blog.

This is very basic and this is a little resume of how the project is build.

Parts

  • Config: The config folder use for simulate a packages that extract the config from a file or a database.

  • Handlers: The handlers folder is the place where the function of Login and Protected are defined the login will generate the JWT and the Protected will read the information.

  • Middlewares: The middlewares folder is the place where the function of JWT is defined.

  • Models: The models folder is the place where the struct of the user and login (Request and Response) is defined.

  • Repository: The repository folder is the place where the function of find the user is defined this simulate a call to a Database.

Thats all, I hope the project can help you a little bit in your journey of Go developer.

FAQs

Last updated on 11 Apr 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc