GithubHelp home page GithubHelp logo

mcluseau / autentigo Goto Github PK

View Code? Open in Web Editor NEW
10.0 5.0 4.0 7.97 MB

A simple JWT server trying to be compatible with common AuthN methods.

License: GNU General Public License v3.0

Go 99.77% Dockerfile 0.23%
golang authentication jwt keystone kubernetes-authentication

autentigo's People

Contributors

mcluseau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

autentigo's Issues

Swagger CORS

Hi,
When requestion swagger.json, there are no CORS headers, so an external Swagger UI can't load and display it

Improve logging when backend not available

If the backend is not available (tested wit etcd), there is no log to explain the problem, only a panic.

2018/08/09 00:42:51 error during request: context deadline exceeded
goroutine 64201 [running]:
github.com/mcluseau/autorizo/api.writeError(0xbca980, 0xf89b60, 0xc4201c8ae0)
	/go/src/github.com/mcluseau/autorizo/api/errors.go:20 +0x109
github.com/mcluseau/autorizo/api.(*API).simpleAuthenticate.func1(0xc4201c8ae0)
	/go/src/github.com/mcluseau/autorizo/api/simple.go:40 +0x71
panic(0xaa1a80, 0xf89b60)
	/usr/local/go/src/runtime/panic.go:502 +0x229
github.com/mcluseau/autorizo/api.(*API).writeAuthResponse(0xc42010bcc0, 0xc4208626c0, 0xc4201c8ae0, 0xc4202be060, 0x9, 0xc4202be0c0, 0xd)
	/go/src/github.com/mcluseau/autorizo/api/simple.go:84 +0x492
github.com/mcluseau/autorizo/api.(*API).simpleAuthenticate(0xc42010bcc0, 0xc4208626c0, 0xc4201c8ae0)
	/go/src/github.com/mcluseau/autorizo/api/simple.go:60 +0x12b
github.com/mcluseau/autorizo/api.(*API).(github.com/mcluseau/autorizo/api.simpleAuthenticate)-fm(0xc4208626c0, 0xc4201c8ae0)
	/go/src/github.com/mcluseau/autorizo/api/simple.go:13 +0x3e
github.com/mcluseau/autorizo/vendor/github.com/emicklei/go-restful.(*Container).dispatch(0xc4201a4000, 0xbd31e0, 0xc420942000, 0xc42025a900)
	/go/src/github.com/mcluseau/autorizo/vendor/github.com/emicklei/go-restful/container.go:249 +0x9ee
github.com/mcluseau/autorizo/vendor/github.com/emicklei/go-restful.(*Container).(github.com/mcluseau/autorizo/vendor/github.com/emicklei/go-restful.dispatch)-fm(0xbd31e0, 0xc420942000, 0xc42025a900)
	/go/src/github.com/mcluseau/autorizo/vendor/github.com/emicklei/go-restful/container.go:95 +0x48
net/http.HandlerFunc.ServeHTTP(0xc42025c350, 0xbd31e0, 0xc420942000, 0xc42025a900)
	/usr/local/go/src/net/http/server.go:1947 +0x44
net/http.(*ServeMux).ServeHTTP(0xf6b500, 0xbd31e0, 0xc420942000, 0xc42025a900)
	/usr/local/go/src/net/http/server.go:2337 +0x130
github.com/mcluseau/autorizo/vendor/github.com/emicklei/go-restful.Container.ServeHTTP(0x0, 0x0, 0x0, 0xc42025d8b0, 0x2, 0x2, 0xf6b500, 0x1, 0xf89e10, 0x0, ...)
	/go/src/github.com/mcluseau/autorizo/vendor/github.com/emicklei/go-restful/container.go:264 +0x52
net/http.serverHandler.ServeHTTP(0xc420216c30, 0xbd31e0, 0xc420942000, 0xc42025a900)
	/usr/local/go/src/net/http/server.go:2694 +0xbc
net/http.(*conn).serve(0xc42012a140, 0xbd39e0, 0xc420312cc0)
	/usr/local/go/src/net/http/server.go:1830 +0x651
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2795 +0x27b

Add /health API

It would be nice to add a new /health/ok API to check if the service is available.

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.