All Projects → furkandeveloper → EasyTokenGenerator

furkandeveloper / EasyTokenGenerator

Licence: MIT License
This repo aims to dynamically and simply generate tokens in Token Based systems.

Programming Languages

C#
18002 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to EasyTokenGenerator

spring-boot-login-example
Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example
Stars: ✭ 50 (+233.33%)
Mutual labels:  jwt-token, jwt-authentication, token-based-authentication
jwtauth-plugin
JWTAuth Plugin for WinterCMS
Stars: ✭ 25 (+66.67%)
Mutual labels:  token, jwt-authentication, token-authentication
phalcon-micro-rest-api-skeleton
This is a basic API REST skeleton written on Phalcon PHP. Great For building an MVP for your frontend app (Vue, react, angular, or anything that can consume an API)
Stars: ✭ 57 (+280%)
Mutual labels:  jwt-token, token, jwt-authentication
pothole detection
By using this app users can report the potholes on road by clicking a photo via our app and if a pothole is detected by Machine Learning modal then it is saved to our Database from where officials can view the specifics like location,reported by and official can resolve the request.User are notified by email for every update regarding their request
Stars: ✭ 17 (+13.33%)
Mutual labels:  jwt-token, jwt-authentication
springboot-graphql-sqqr-jwt-demo
GraphQL java backend representing the right way to authenticate/authorize using Spring boot, graphql-spqr & jsonwebtoken
Stars: ✭ 28 (+86.67%)
Mutual labels:  jwt-token, jwt-authentication
express-mongo-jwt-boilerplate
Express Mongo JsonWebToken boilerplate
Stars: ✭ 100 (+566.67%)
Mutual labels:  jwt-token, jwt-authentication
Quasar-JWT
Quasar - JWT Authentication Starter Kit
Stars: ✭ 38 (+153.33%)
Mutual labels:  jwt-token, jwt-authentication
node-mysql
Node with mysql boilerplate
Stars: ✭ 72 (+380%)
Mutual labels:  jwt-token, jwt-authentication
token-authentication-django
This is django app used to explain the tutorial present on https://medium.com/@shubhambansal_89125/token-based-authentication-for-django-rest-framework-44586a9a56fb
Stars: ✭ 27 (+80%)
Mutual labels:  token, token-based-authentication
NodeScalableArchitecture
A Scalable Node Architecture/Server. This repository contains a complete implementation of writing scalable nodejs server/architecture on my medium blog.
Stars: ✭ 62 (+313.33%)
Mutual labels:  jwt-token, jwt-authentication
API-Authentication-NodeJs
API Authentication using JWT's (JSON Web Tokens). Plug n Play inside any app which requires authentication. NodeJs Express MongoDB & Redis.
Stars: ✭ 162 (+980%)
Mutual labels:  jwt-token, jwt-authentication
laravel-vue-starter
Well Documented Laravel Starter App From Development to Production. For Full Blown RESTFUL API and SPA with Beautiful UI Using Buefy / ElementUi For Reusable Vue Components
Stars: ✭ 80 (+433.33%)
Mutual labels:  jwt-token, jwt-authentication
tongyimall
高仿小米商城用户端,是Vue + SpringBoot的前后端分离项目,包括首页门户、商品分类、首页轮播、商品展示、购物车、地址管理等部分。管理端在另一个仓库。
Stars: ✭ 55 (+266.67%)
Mutual labels:  jwt-token, token
React-Express-JWT-UserPortal
React.js & Express.js User portal Using Core UI, JWT, JWT Token, Refresh Token, Role & Permission management, User manamgenet, Event Log.
Stars: ✭ 22 (+46.67%)
Mutual labels:  jwt-token, jwt-authentication
Human-Resources-Management-System
Human Resources Management System Project
Stars: ✭ 32 (+113.33%)
Mutual labels:  jwt-token, jwt-authentication
jwx
JSON/JWK/JWS/JWT/Base64 library in SPARK
Stars: ✭ 15 (+0%)
Mutual labels:  jwt-token, jwt-authentication
Auth-using-Vuejs-express-jwt-nodejs
Login and signup form and authentication using Vue.js, express, mongodb, JWT and bootstrap-vue
Stars: ✭ 17 (+13.33%)
Mutual labels:  jwt-token, jwt-authentication
go-jwt-issuer
Microservice generates the pair of JSON web tokens - access-token and refresh-token are signed by user identifier.
Stars: ✭ 30 (+100%)
Mutual labels:  token, jwt-authentication
gatsby-starter-redux-saas
An Gatsby starter for Saas products. Uses redux and apollo and a graphql token auth backend.
Stars: ✭ 18 (+20%)
Mutual labels:  jwt-token, jwt-authentication
vue-token
Simple token storage/ authorization in vuejs.
Stars: ✭ 13 (-13.33%)
Mutual labels:  jwt-token, token

Token Generator for .Net

CodeFactor .NET Core License: MIT CircleCI Nuget Nuget Maintainability

Heeey, This repo aims to dynamically and simply generate tokens in Token Based systems. Follow me;

  • Turn on your computer.
  • Prepare your coffee.
  • And sit back.

What is Authentication?

Authentication is the set of processes that try to recognize the user on the system with information such as User Name, Password, Email or Phone Number.

Single Factor Authentication

This method, which we use quite often in daily life, will be sufficient for the user to enter the password corresponding to any information in order to navigate in the system.

Two Factor Authentication

With this method, a more secure authentication is achieved by requesting another information that can only be accessed by the user in addition to User Name and Password information. An example is the confirmation code that is used in daily life in banks and comes as an SMS after login.

What is Token Based Authentication?

A token is a piece of data that has no meaning or use on its own, but combined with the correct tokenization system, becomes a vital player in securing your application. Token based authentication works by ensuring that each request to a server is accompanied by a signed token which the server verifies for authenticity and only then responds to the request.

JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained method for securely transmitting information between parties encoded as a JSON object. JWT has gained mass popularity due to its compact size which allows tokens to be easily transmitted via query strings, header attributes and within the body of a POST request.

Getting Started

Install EasyTokenGenerator from Nuget.

Startup.cs Configuration

services.AddEasyJwtToken(options =>
{
      Configuration.Bind(nameof(JwtBearerOptions), options);
      options.SecurityKey = Configuration.GetValue<string>("SecurityKey");
});

Usage

Get the IJwtTokenGenerator interface from the Constructor.

private readonly IJwtTokenService jwtTokenService;

public AccountController(IJwtTokenService jwtTokenService)
{
      this.jwtTokenService = jwtTokenService;
}

Generate Claims

var claims = await jwtTokenService.GenerateClaimsAsync(new List<Jwt.Models.ClaimDto>()
{
    new Jwt.Models.ClaimDto()
    {
        Type = "Email",
        Value = "[email protected]"
    }
});

Generate Jwt Token

var jwtToken = await jwtTokenService.GenerateJwtTokenAsync(claims, Jwt.Models.Algorithms.HmacSha256Signature);

Easy Token Generator supported Security Algorithms. Look.

public enum Algorithms
{
    HmacSha256Signature,
    HmacSha384,
    HmacSha512,
    RsaSha256Signature,
    RsaSha384Signature,
    RsaSha512Signature,
    EcdsaSha256,
    EcdsaSha384,
    EcdsaSha512,
    RsaSsaPssSha256,
    RsaSsaPssSha384
}

Generate Refresh Token

await jwtTokenService.GenerateRefreshTokenAsync(size:64)

Extensions

Claims Extensions

public static Claim GetClaim(this IEnumerable<Claim> claims, string claimType)
            => claims?.FirstOrDefault(x => x.Type == claimType);
// Usage
var claim = User.Claims.GetClaim("Email");
public static string GetClaimValue(this IEnumerable<Claim> claims, string claimType)
            => claims?.FirstOrDefault(x => x.Type == claimType)?.Value;
// Usage
var claimValue = User.Claims.GetClaimValue("Email");
public static IEnumerable<Claim> GetClaims(this IEnumerable<Claim> claims, string claimType)
            =>claims?.Where(x => x.Type == claimType);
// Usage
var claims = User.Claims.GetClaims("Email");
public static string GetEmail(this IEnumerable<Claim> claims)
            => claims.GetClaim(ClaimTypes.Email)?.Value;
// Usage
var email = User.Claims.GetEmail();
public static string GetGivenName(this IEnumerable<Claim> claims)
            => claims.GetClaim(ClaimTypes.GivenName)?.Value;
// Usage
var givenName = User.Claims.GetGivenName();
public static string GetExpiration(this IEnumerable<Claim> claims)
            => claims.GetClaim(ClaimTypes.Expiration)?.Value;
// Usage
var expiration = User.Claims.GetExpiration();

You can look at the demo

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].