Git Product home page Git Product logo

gin-contrib-headerauth's Introduction

Metrics

gin-contrib-headerauth's People

Contributors

christopherrabotin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

webpatch

gin-contrib-headerauth's Issues

Add Quick start to README

Reading the examples provided definitely helps, but a quick start would be much easier. This issue should also detail how we can use header based auth without a signature.

Better code coverage

Current code coverage is 96.7%, with line 50 not being covered:

github.com/ChristopherRabotin/gin-contrib-signedauth/signatureauth.go:49.23,51.6 1 0

A simple test for this is adding a Manager which will fail on the DataToSign function, and test the status is valid.

It could also be of interest to add the coverage profile on the README.

Better idiomatic Go with embedded interfaces

As per the docs, this module would be easier and more idiomatic if the auth manager would be like this:

type MyManager struct{
   SomeField interface{}
   *signedauth.Manager
}
mgr := &MyManager{{}, signedauth.Manager{AuthPrefix: "EXAMPLE", ...}}

I must check whether it's possible in go then to call a function which the Manager expects, e.g. SecretKey (which will be handled differently depending on the manager), although that function won't be defined by signedauth.Manager.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.