mcluseau / autentigo Goto Github PK
View Code? Open in Web Editor NEWA simple JWT server trying to be compatible with common AuthN methods.
License: GNU General Public License v3.0
A simple JWT server trying to be compatible with common AuthN methods.
License: GNU General Public License v3.0
Hi,
When requestion swagger.json, there are no CORS headers, so an external Swagger UI can't load and display it
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
It would be nice to add a new /health/ok API to check if the service is available.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.