From f81f1fb3881737870dd7aa5a761dec895ef038c7 Mon Sep 17 00:00:00 2001 From: Jan Olszak Date: Fri, 2 Jun 2017 23:04:17 +0200 Subject: [PATCH 1/2] Changed Hydra's paths and updated to v0.8.5 --- README.md | 2 +- challenge.go | 4 +-- glide.lock | 96 ++++++++++++++++++++++------------------------------ glide.yaml | 7 ++-- idp.go | 8 ++--- 5 files changed, 52 insertions(+), 65 deletions(-) diff --git a/README.md b/README.md index 60436f4..71253d4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Identity Provider (IdP) for Hydra [![Build Status](https://travis-ci.org/janekolszak/idp.svg?branch=master)](https://travis-ci.org/janekolszak/idp) [![Code Climate](https://codeclimate.com/github/janekolszak/idp/badges/gpa.svg)](https://codeclimate.com/github/janekolszak/idp) [![GoDoc](https://godoc.org/github.com/janekolszak/idp?status.svg)](https://godoc.org/github.com/janekolszak/idp) [![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg?maxAge=2592000)](https://gitter.im/janekolszak/idp) -This is a helper library for handling *challenge* requests from [Hydra](https://github.com/ory-am/hydra), it handles: +This is a helper library for handling *challenge* requests from [Hydra](https://github.com/ory/hydra), it handles: - Storing challenge in a short lived cookie instead of query parameters - Passing user's consent to Hydra - Retriving keys from Hydra and using them for JWT verification diff --git a/challenge.go b/challenge.go index 8678d61..8754501 100644 --- a/challenge.go +++ b/challenge.go @@ -1,11 +1,11 @@ -// Package for handling challenge requests from Hydra(https://github.com/ory-am/hydra). +// Package for handling challenge requests from Hydra(https://github.com/ory/hydra). package idp import ( "encoding/gob" jwt "github.com/dgrijalva/jwt-go" // "github.com/gorilla/sessions" - hclient "github.com/ory-am/hydra/client" + hclient "github.com/ory/hydra/client" "net/http" "time" ) diff --git a/glide.lock b/glide.lock index c688659..946f02c 100644 --- a/glide.lock +++ b/glide.lock @@ -1,28 +1,18 @@ -hash: 4e3b814ee45e3ba97a5fdd44e34a4bbbde6a4d81c6b39fbc808732fab9b489f9 -updated: 2017-04-28T12:59:20.104114063+02:00 +hash: c06e7fbb7e614489e9ec74a0684af671fa6f34f034fb2e50d7de6d8ff818e971 +updated: 2017-06-02T23:23:00.239987109+02:00 imports: - name: github.com/asaskevich/govalidator version: 7b3beb6df3c42abd3509abfc3bcacc0fbfb7c877 -- name: github.com/cenkalti/backoff - version: 5d150e7eec023ce7a124856b37c68e54b4050ac7 - name: github.com/davecgh/go-spew - version: 6d212800a42e8ab5c146b8ace3490ee17e5225f9 + version: 5215b55f46b2b919f50a1df0eaa5886afe4e3b3d subpackages: - spew - name: github.com/dgrijalva/jwt-go version: d2709f9f1f31ebcda9651b03077758c1f3a0018c - name: github.com/fsnotify/fsnotify - version: fd9ec7deca8bf46ecd2a795baaacf2b3a9be1197 + version: a904159b9206978bb6d53fcc7a769e5cd726c737 - name: github.com/go-errors/errors version: 8fa88b06e5974e97fbf9899a7f86a344bfd1f105 -- name: github.com/go-redis/redis - version: 5d95eaece6a4a3b68e07419504b6f415f74e90bb - subpackages: - - internal - - internal/consistenthash - - internal/hashtag - - internal/pool - - internal/proto - name: github.com/go-sql-driver/mysql version: a0583e0143b1624142adab07e0e97fe106d99561 - name: github.com/golang/protobuf @@ -34,11 +24,13 @@ imports: - name: github.com/gorilla/securecookie version: fa5329f913702981df43dcb2a380bac429c810b5 - name: github.com/gorilla/sessions - version: 83c8db3bdc9be789e57e3756ffbcffd2d7d40176 -- name: github.com/hailocab/go-hostpool - version: e80d13ce29ede4452c43dea11e79b9bc8a15b478 + version: ca9ada44574153444b00d3fd9c8559e4cc95f896 +- name: github.com/hashicorp/golang-lru + version: 0a025b7e63adc15a622f29b0b2c4c3848243bbf6 + subpackages: + - simplelru - name: github.com/hashicorp/hcl - version: 80e628d796135357b3d2e33a985c666b9f35eee1 + version: 372e8ddaa16fd67e371e9323807d056b799360af subpackages: - hcl/ast - hcl/parser @@ -53,45 +45,45 @@ imports: - name: github.com/inconshreveable/mousetrap version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 - name: github.com/jmoiron/sqlx - version: cac998c4f0959c19c638c523e374fa8e4e0bcfe3 + version: f980a91bdc37abef88269b8f122d7de6352102f5 subpackages: - reflectx - name: github.com/julienschmidt/httprouter version: 8c199fb6259ffc1af525cc3ad52ee60ba8359669 - name: github.com/lib/pq - version: 22cb3e4c487ce6242e2b03369219e5631eed1221 + version: d67b1982b9d913b680e5f04323785fc69366d306 subpackages: - oid - name: github.com/magiconair/properties - version: 9c47895dc1ce54302908ab8a43385d1f5df2c11c + version: b3b15ef068fd0b17ddf408a23669f20811d194d2 - name: github.com/mitchellh/mapstructure - version: bfdb1a85537d60bc7e954e600c250219ea497417 + version: db1efb556f84b25a0a13a04aad883943538ad2e0 - name: github.com/moul/http2curl version: 4e24498b31dba4683efb9d35c1c8a91e2eda28c8 - name: github.com/oleiade/reflections - version: 2b6ec3da648e3e834dc41bad8d9ed7f2dc6a9496 + version: ec27669d960a245738b87ffa688dac28fa288c33 - name: github.com/ory-am/common version: b6357395e30805e2ad1f6d8fb759fa2b7146d8da subpackages: - compiler - pkg - rand/sequence -- name: github.com/ory-am/fosite - version: ad395bf323137e30ce12d40646a9229a42695863 +- name: github.com/ory/fosite + version: fe74027ee70292a72fe453095603cca060ff6290 subpackages: - - compose - handler/oauth2 - handler/openid - storage - token/hmac - token/jwt -- name: github.com/ory-am/hydra - version: 14ad439cae7058dcc79407cd8ba3172d2e08e858 +- name: github.com/ory/herodot + version: 08c8ed5c0ae5ba48df19e324bf84bb1c612bc768 +- name: github.com/ory/hydra + version: baf60d29d99aae9b5100181374b150075796342f subpackages: - client - config - firewall - - herodot - jwk - oauth2 - pkg @@ -100,8 +92,11 @@ imports: - sdk - warden - warden/group -- name: github.com/ory-am/ladon - version: c7c7754c7b466db0a7d18c53254672c78aeea664 +- name: github.com/ory/ladon + version: 24fe723368e1f47534219523c0580948cc7b873e + subpackages: + - manager/memory + - manager/sql - name: github.com/patrickmn/go-cache version: 1881a9bccb818787f68c52bfba648c6cf34c34fa - name: github.com/pborman/uuid @@ -109,31 +104,31 @@ imports: - name: github.com/pelletier/go-buffruneio version: df1e16fde7fc330a0ca68167c23bf7ed6ac31d6d - name: github.com/pelletier/go-toml - version: 439fbba1f887c286024370cb4f281ba815c4c7d7 + version: c9506ee96398e7571356462217b9e24d6a628d71 - name: github.com/pkg/errors version: 645ef00459ed84a119197bfb8d8205042c6df63d - name: github.com/pmezard/go-difflib - version: d8ed2627bdf02c080bf22230dbb337003b7aba2d + version: 792786c7400a136282c1664665ae0a8db921c6c2 subpackages: - difflib - name: github.com/rubenv/sql-migrate - version: a3ed23a40ebd39f82bf2a36768ed7d595f2bdc1e + version: f64b6080c334adaf843209164107439e92bb170b subpackages: - sqlparse - name: github.com/Sirupsen/logrus version: ba1b36c82c5e05c4f912a88eab0dcd91a171688f - name: github.com/spf13/afero - version: 90dd71edc4d0a8b3511dc12ea15d617d03be09e0 + version: 72b31426848c6ef12a7a8e216708cb0d1530f074 subpackages: - mem - name: github.com/spf13/cast - version: 56a7ecbeb18dde53c6db4bd96b541fd9741b8d44 + version: d1139bab1c07d5ad390a65e7305876b3c1a8370b - name: github.com/spf13/cobra - version: 1dd5ff2e11b6dca62fdcb275eb804b94607d8b06 + version: b5d8e8f46a2f829f755b6e33b454e25c61c935e1 - name: github.com/spf13/jwalterweatherman - version: 33c24e77fb80341fe7130ee7c594256ff08ccc46 + version: fa7ca7e836cf3a8bb4ebf799f472c12d7e903d66 - name: github.com/spf13/pflag - version: 25f8b5b07aece3207895bf19f7ab517eb3b22a40 + version: 9ff6c6923cfffbcd502984b8e0c80539a94968b7 - name: github.com/spf13/viper version: 5ed0fc31f7f453625df314d8e66b9791e8d13003 - name: github.com/square/go-jose @@ -141,36 +136,35 @@ imports: subpackages: - json - name: github.com/stretchr/testify - version: 69483b4bd14f5845b5a1e55bca19e954e827f1d0 + version: f390dcf405f7b83c997eac1b06768bb9f44dec18 subpackages: - assert - require - name: golang.org/x/crypto - version: f6b343c37ca80bfa8ea539da67a0b621f84fab1d + version: 453249f01cfeb54c3d549ddb75ff152ca243f9d8 subpackages: - bcrypt - blowfish - - pbkdf2 - name: golang.org/x/net version: f315505cf3349909cdf013ea56690da34e96a451 subpackages: - context - name: golang.org/x/oauth2 - version: 314dd2c0bf3ebd592ec0d20847d27e79d0dbe8dd + version: de0725b330ab43c1a3d6c84d961cf01183783f1e subpackages: - clientcredentials - internal - name: golang.org/x/sys - version: d75a52659825e75fff6158388dddc6a5b04f9ba5 + version: e24f485414aeafb646f6fca458b0bf869c0880a1 subpackages: - unix - name: golang.org/x/text - version: fd889fe3a20f4878f5f47672fd3ca5b86db005e2 + version: 06d6eba81293389cafdff7fca90d75592194b2d9 subpackages: - transform - unicode/norm - name: google.golang.org/appengine - version: 08a149cfaee099e6ce4be01c0113a78c85ee1dee + version: 2e4a801b39fc199db615bfca7d0b9f8cd9580599 subpackages: - internal - internal/base @@ -179,14 +173,6 @@ imports: - internal/remote_api - internal/urlfetch - urlfetch -- name: gopkg.in/fatih/pool.v2 - version: 20a0a429c5f93de45c90f5f09ea297c25e0929b3 -- name: gopkg.in/gorethink/gorethink.v3 - version: 7ab832f7b65573104a555d84a27992ae9ea1f659 - subpackages: - - encoding - - ql2 - - types - name: gopkg.in/gorp.v1 version: c87af80f3cc5036b55b83d77171e156791085e2e - name: gopkg.in/square/go-jose.v1 @@ -195,5 +181,5 @@ imports: - cipher - json - name: gopkg.in/yaml.v2 - version: a5b47d31c556af34a302ce5d659e6fea44d90de0 + version: a3f3340b5840cee44f372bddb5880fcbc419b46a testImports: [] diff --git a/glide.yaml b/glide.yaml index c2aba32..0da4a38 100644 --- a/glide.yaml +++ b/glide.yaml @@ -1,10 +1,11 @@ -package: . +package: github.com/janekolszak/idp import: - package: github.com/dgrijalva/jwt-go version: ~3.0.0 - package: github.com/gorilla/sessions -- package: github.com/ory-am/hydra - version: ~0.7.11 + version: ~1.1.0 +- package: github.com/ory/hydra + version: ~0.8.5 subpackages: - client - jwk diff --git a/idp.go b/idp.go index 20ea2c0..b096269 100644 --- a/idp.go +++ b/idp.go @@ -7,10 +7,10 @@ import ( jwt "github.com/dgrijalva/jwt-go" "github.com/gorilla/sessions" - hclient "github.com/ory-am/hydra/client" - hjwk "github.com/ory-am/hydra/jwk" - hoauth2 "github.com/ory-am/hydra/oauth2" - hydra "github.com/ory-am/hydra/sdk" + hclient "github.com/ory/hydra/client" + hjwk "github.com/ory/hydra/jwk" + hoauth2 "github.com/ory/hydra/oauth2" + hydra "github.com/ory/hydra/sdk" "github.com/patrickmn/go-cache" ) From 0dc71a09846ada7505b4f20161f0c7f3655b8a44 Mon Sep 17 00:00:00 2001 From: Jan Olszak Date: Sat, 3 Jun 2017 00:01:11 +0200 Subject: [PATCH 2/2] Fixed glide.lock --- glide.lock | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/glide.lock b/glide.lock index 946f02c..0aca22b 100644 --- a/glide.lock +++ b/glide.lock @@ -1,10 +1,10 @@ hash: c06e7fbb7e614489e9ec74a0684af671fa6f34f034fb2e50d7de6d8ff818e971 -updated: 2017-06-02T23:23:00.239987109+02:00 +updated: 2017-06-02T23:59:32.103139052+02:00 imports: - name: github.com/asaskevich/govalidator version: 7b3beb6df3c42abd3509abfc3bcacc0fbfb7c877 - name: github.com/davecgh/go-spew - version: 5215b55f46b2b919f50a1df0eaa5886afe4e3b3d + version: 6d212800a42e8ab5c146b8ace3490ee17e5225f9 subpackages: - spew - name: github.com/dgrijalva/jwt-go @@ -61,7 +61,7 @@ imports: - name: github.com/moul/http2curl version: 4e24498b31dba4683efb9d35c1c8a91e2eda28c8 - name: github.com/oleiade/reflections - version: ec27669d960a245738b87ffa688dac28fa288c33 + version: 2b6ec3da648e3e834dc41bad8d9ed7f2dc6a9496 - name: github.com/ory-am/common version: b6357395e30805e2ad1f6d8fb759fa2b7146d8da subpackages: @@ -69,15 +69,16 @@ imports: - pkg - rand/sequence - name: github.com/ory/fosite - version: fe74027ee70292a72fe453095603cca060ff6290 + version: 575dd791f9f11cd8e5471178b1ec3a7638653cae subpackages: + - compose - handler/oauth2 - handler/openid - storage - token/hmac - token/jwt - name: github.com/ory/herodot - version: 08c8ed5c0ae5ba48df19e324bf84bb1c612bc768 + version: ef15ccfb8c16051feca9ec289286732f8d288fec - name: github.com/ory/hydra version: baf60d29d99aae9b5100181374b150075796342f subpackages: @@ -108,7 +109,7 @@ imports: - name: github.com/pkg/errors version: 645ef00459ed84a119197bfb8d8205042c6df63d - name: github.com/pmezard/go-difflib - version: 792786c7400a136282c1664665ae0a8db921c6c2 + version: d8ed2627bdf02c080bf22230dbb337003b7aba2d subpackages: - difflib - name: github.com/rubenv/sql-migrate @@ -136,7 +137,7 @@ imports: subpackages: - json - name: github.com/stretchr/testify - version: f390dcf405f7b83c997eac1b06768bb9f44dec18 + version: 69483b4bd14f5845b5a1e55bca19e954e827f1d0 subpackages: - assert - require