HTTP-server-with-auth# HTTP Server With Authentication

Overview

HTTP-server-with-auth# HTTP Server With Authentication

Introduction

You are to use gin framework package and concurrency in golang and jwt-go to implement a simple http server. You should implement an rest api with authentication on some endpoints to upload or download a file. All registered users can upload and download files. no user can download other user's files. users can give access to other specific users to download their files. REST APIs that you should implement are listed below:

localhost:8080/register

  1. json :
    {
       "username" : "string",
       "password" : "string"
    }
    create new user

localhost:8080/login

  1. json :
    {
       "username" : "string",
       "password" : "string"
    }
    logins and gives access token

localhost:8080/uploadFile with auth

input formats :

  1. form :

      file : []byte
    

    In this format, file is a byte array of the actual file. uploads file in filesystem.

output format :

  1. json :

    successful upload :

     {
         "download_url" : "string"
     }

    download_url is the path of saved file in filesystem.

    failure upload :

     {
         "error" : "string"
     }

    error is a description of the occurred error.


localhost:8080/downloadFile with auth

  1. json :

     {
         "download_url" : "string"
     }

    In this format, download_url is an id that we got in successful upload request. it will download the file if user has download premission.


output format :

  1. json :

    successful download :

      http response with actual file
    


    failure download :

     {
         "error" : "string"
     }

    error is a description of the occurred error.

localhost:8080/addPremission with auth

  1. json :
     {
         "download_url" : "string",
         "user_to_be_add" : "string"
     }

Owner
Saba Sahban
Computer engineering student at Amirkabir University of Technology
Saba Sahban
vault-plugin-auth-usertotp is an auth method plugin for HashiCorp Vault.

vault-plugin-auth-usertotp is an auth method plugin for HashiCorp Vault. Create user accounts, add TOTP tokens (user supplied pin + totp), and have peace of mind using 2FA.

null 0 Jul 30, 2021
Gets Firebase auth tokens (for development purposes only)Gets Firebase auth tokens

Firebase Token Gets Firebase auth tokens (for development purposes only) Getting started Create Firebase project Setup Firebase authentication Setup G

MousyBusiness 1 Nov 17, 2021
Auth Go microservice for managing authentication sessions

cryptomath-go-auth Auth Go microservice for managing authentication sessions. Install dependencies $ make deps Build $ make vendor $ make build Databa

Crypto Math 0 Mar 4, 2022
Vault Authentication Azure Auth Method Demo Application

This application demonstrates how applications hosted on Azure VMs can use managed identity to authenticate with HashiCorp Vault using the Azure Auth Method.

DevOps Rob 1 Feb 10, 2022
Authelia: an open-source authentication and authorization server providing two-factor authentication

Authelia is an open-source authentication and authorization server providing two

Streato 0 Jan 5, 2022
Authentication Plugin for implementing Form-Based, Basic, Local, LDAP, OpenID Connect, OAuth 2.0, SAML Authentication

Authentication Plugin for implementing Form-Based, Basic, Local, LDAP, OpenID Connect, OAuth 2.0, SAML Authentication

Paul Greenberg 372 May 15, 2022
A simple passwordless authentication middleware that uses only email as the authentication provider

email auth A simple passwordless authentication middleware that uses only email as the authentication provider. Motivation I wanted to restrict access

Miroslav Šedivý 4 Jan 31, 2022
Authorization and authentication. Learning go by writing a simple authentication and authorization service.

Authorization and authentication. Learning go by writing a simple authentication and authorization service.

Dinesh Bhattarai 0 Jan 30, 2022
The boss of http auth.

Authboss Authboss is a modular authentication system for the web. It has several modules that represent authentication and authorization features that

Volatile Technologies Inc. 3.1k May 17, 2022
Nsq http auth service for golang

nsq-auth nsq http auth service ./nsq-auth -h Usage: 2021/12/25 17:10:56 Usage:

纸喵 9 Apr 21, 2022
Basic and Digest HTTP Authentication for golang http

HTTP Authentication implementation in Go This is an implementation of HTTP Basic and HTTP Digest authentication in Go language. It is designed as a si

Lev Shamardin 516 May 9, 2022
Provides AWS STS credentials based on Google Apps SAML SSO auth with interactive GUI support

What's this This command-line tool allows you to acquire AWS temporary (STS) credentials using Google Apps as a federated (Single Sign-On, or SSO) pro

Quan Hoang 30 Apr 29, 2022
Validate Django auth session in Golang

GoDjangoSession Valid for django 3.0.5 Usage: package main import ( "encoding/base64" "fmt" "session/auth" "github.com/Kuzyashin/GoDjangoSession"

Alexey Kuzyashin 26 Feb 13, 2022
Golang Mongodb Jwt Auth Example Using Echo

Golang Mongodb Jwt Auth Example Using Echo Golang Mongodb Rest Api Example Using Echo Prerequisites Golang 1.16.x Docker 19.03+ Docker Compose 1.25+ I

Şuayb Şimşek 6 Sep 21, 2021
Durudex Auth Service

⚡️ Durudex Auth Service Durudex Auth Service ?? Prerequisites Go 1.17 migrate grpc ⚙️ Build & Run Create an .env file in the root directory and add th

null 11 Apr 16, 2022
Figma Auth service for Haiku Animator

Figma Auth service for Haiku Animator In order to use Haiku Animator's Figma integration, a service must be running to perform OAuth2 token exchange.

Haiku 3 Feb 28, 2022
Golang Kalkancrypt Wrapper - simple digital signature auth service

Golang Kalkancrypt Wrapper WIP ⭐ Star on GitHub — it motivates me a lot! Overview Golang Kalkancrypt Wrapper - это простой веб-сервис для аутентификац

Abylaikhan Zulbukharov 44 May 4, 2022
Run multiple auth functions by relation

Relation Run multiple auth functions by relation. Signatures func New(relation string, conditions ...func(c *fiber.Ctx) bool) fiber.Handler Import imp

Eren BALCI 4 Oct 31, 2021
Auth Middleware for session & white-listed routing

Auth Middleware for session & white-listed routing

Joe Gasewicz 2 Nov 4, 2021