From 988dd5fa8d9c44b8f9079c9d7b5dbbd0d9e090a0 Mon Sep 17 00:00:00 2001 From: Alexis Poyen <apoyen@mail.apoyen.fr> Date: Mon, 4 May 2020 12:23:29 +0200 Subject: [PATCH] Remove : vestibule references --- .gitignore | 1 - .vscode/launch.json | 4 ++-- data/users.db | Bin 12288 -> 12288 bytes docker-compose.yml | 2 +- go.mod | 2 +- go.sum | 11 ----------- internal/mocks/mocks.go | 2 +- internal/rootmux/rootmux.go | 4 ++-- internal/rootmux/rootmux_test.go | 2 +- main.go | 6 +++--- pkg/auth/auth.go | 2 +- pkg/auth/auth_test.go | 2 +- pkg/auth/inmemory.go | 6 +++--- pkg/auth/oauth2.go | 6 +++--- pkg/tokens/tokens.go | 4 ++-- pkg/tokens/tokens_test.go | 2 +- web/index.html | 22 +--------------------- 17 files changed, 23 insertions(+), 55 deletions(-) diff --git a/.gitignore b/.gitignore index a690283..64cd506 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -vestibule __debug_bin miscellaneous/mock_onlyoffice/data data \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 2aa51e4..675315a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -47,7 +47,7 @@ "LOGOUT_URL": "https://connexion-rec.grandlyon.fr/auth/logout.jsp", "ADMIN_GROUP": "GGD_ORG_DG-DEES-DINSI-DAAG_TOUS", "CLIENT_GROUP": "GGD_ORG_DG-DEES-DINSI-DAAG_TOUS", - "HOSTNAME": "vestibule.127.0.0.1.nip.io", + "HOSTNAME": "sdk-go.127.0.0.1.nip.io", }, "args": ["-debug", "-https_port=1443"], "showLog": true @@ -57,7 +57,7 @@ "type": "firefox", "request": "launch", "reAttach": true, - "url": "https://vestibule.127.0.0.1.nip.io:1443", + "url": "https://sdk-go.127.0.0.1.nip.io:1443", "webRoot": "${workspaceFolder}/web" } ] diff --git a/data/users.db b/data/users.db index e9762194df4f577e3e5737e17077abe89a10a2e7..ae68077b7f8523f5d7577885f3697c70c99ce8e9 100644 GIT binary patch delta 142 zcmZojXh@hK&6qq<#+fmBW5OF5QxlV<+*}u5LqGGNiiq;k#6-j7z$pKuG?V1CO3yUI zK;trVb7${N_u>>6FSjz!@*MwU{mRLWvdX3@r5Tx(ss2X(QK<#arEca<rjdz3rI{9K uWf5t4=1D#QA<1Qy<`JQWrcTbmW<Ke8&Y_j=n{Uc02(dGk7N-^!a{vH<jxUt} delta 142 zcmZojXh@hK%@{vX#+fmGW5OF5Q<p-w^l~pFk6`n>kfdD0BsV|jv?%`oJ<p<~yppWK za6Jom&*H4&u!@v&pKK2!e~YqYuiVLvvdX5#DFH#jML}6<`o<+*KAsl26?yu(dchR| ufi6`h8HMQ{**TeE`9{HciB$&9r9K52W@b*gn{Uc02(j~*7N-^!n*ji(MKG-Z diff --git a/docker-compose.yml b/docker-compose.yml index c0514a0..0b97eb6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "2.4" services: - vestibule-container: + sdk-go-container: image: sdk-go build: . #command: -debug diff --git a/go.mod b/go.mod index 122f503..4a40dd4 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/jinzhu/gorm v1.9.12 github.com/kr/pretty v0.2.0 // indirect github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect - github.com/nicolaspernoud/vestibule v0.0.0-20200331070557-e891662e1a8a + forge.grandlyon.com/apoyen/sdk-go v0.0.0-20200331070557-e891662e1a8a github.com/oschwald/maxminddb-golang v1.6.0 golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59 golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e // indirect diff --git a/go.sum b/go.sum index 5dca299..9b76e46 100644 --- a/go.sum +++ b/go.sum @@ -20,8 +20,6 @@ github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.0.1 h1:HjfetcXq097iXP0uoPCdnM4Efp5/9MsM0/M+XOTeR3M= github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -33,22 +31,16 @@ github.com/mattn/go-sqlite3 v2.0.1+incompatible h1:xQ15muvnzGBHpIpdrNi1DA5x0+TcB github.com/mattn/go-sqlite3 v2.0.1+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U= github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/nicolaspernoud/vestibule v0.0.0-20200331070557-e891662e1a8a h1:eQqEnGtO3nMBv5I8hQJ7oUkFT/e/7cs5XouqOfecDOc= -github.com/nicolaspernoud/vestibule v0.0.0-20200331070557-e891662e1a8a/go.mod h1:PUkza1Qy7uGKem5gih+GMnHBRnWbWZaflDyJm5AXi78= github.com/oschwald/maxminddb-golang v1.6.0 h1:KAJSjdHQ8Kv45nFIbtoLGrGWqHFajOIm7skTyz/+Dls= github.com/oschwald/maxminddb-golang v1.6.0/go.mod h1:DUJFucBg2cvqx42YmDa/+xHvb0elJtOm3o4aFQ/nb/w= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/secure-io/sio-go v0.3.1 h1:dNvY9awjabXTYGsTF1PiCySl9Ltofk9GA3VdWlo7rRc= -github.com/secure-io/sio-go v0.3.1/go.mod h1:+xbkjDzPjwh4Axd07pRKSNriS9SCiYksWnZqdnfpQxs= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200320181102-891825fb96df/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59 h1:3zb4D3T4G8jdExgVU/95+vQXfpEPiMdCaZgmGVxjNHM= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -56,7 +48,6 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20200320220750-118fecf932d8/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= @@ -66,8 +57,6 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191224085550-c709ea063b76/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200321134203-328b4cd54aae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775 h1:TC0v2RSO1u2kn1ZugjrFXkRZAEaqMN/RW+OTZkBzmLE= diff --git a/internal/mocks/mocks.go b/internal/mocks/mocks.go index 9ccdf81..d20b500 100644 --- a/internal/mocks/mocks.go +++ b/internal/mocks/mocks.go @@ -7,7 +7,7 @@ import ( "os" "strconv" - "github.com/nicolaspernoud/vestibule/pkg/middlewares" + "forge.grandlyon.com/apoyen/sdk-go/pkg/middlewares" ) const literralContentType = "Content-Type" diff --git a/internal/rootmux/rootmux.go b/internal/rootmux/rootmux.go index 0f7915d..af967da 100644 --- a/internal/rootmux/rootmux.go +++ b/internal/rootmux/rootmux.go @@ -6,9 +6,9 @@ import ( "forge.grandlyon.com/apoyen/sdk-go/internal/models" "forge.grandlyon.com/apoyen/sdk-go/pkg/auth" - "github.com/nicolaspernoud/vestibule/pkg/middlewares" + "forge.grandlyon.com/apoyen/sdk-go/pkg/middlewares" - "github.com/nicolaspernoud/vestibule/pkg/common" + "forge.grandlyon.com/apoyen/sdk-go/pkg/common" ) // RootMux represents the main controller of the application diff --git a/internal/rootmux/rootmux_test.go b/internal/rootmux/rootmux_test.go index 78b3337..4430767 100644 --- a/internal/rootmux/rootmux_test.go +++ b/internal/rootmux/rootmux_test.go @@ -13,7 +13,7 @@ import ( "forge.grandlyon.com/apoyen/sdk-go/pkg/auth" "forge.grandlyon.com/apoyen/sdk-go/pkg/tester" - "github.com/nicolaspernoud/vestibule/pkg/tokens" + "forge.grandlyon.com/apoyen/sdk-go/pkg/tokens" "forge.grandlyon.com/apoyen/sdk-go/internal/mocks" ) diff --git a/main.go b/main.go index f6fee58..253abf9 100644 --- a/main.go +++ b/main.go @@ -11,12 +11,12 @@ import ( "syscall" "time" - "github.com/nicolaspernoud/vestibule/pkg/middlewares" - "github.com/nicolaspernoud/vestibule/pkg/tokens" + "forge.grandlyon.com/apoyen/sdk-go/pkg/middlewares" + "forge.grandlyon.com/apoyen/sdk-go/pkg/tokens" "forge.grandlyon.com/apoyen/sdk-go/internal/mocks" "forge.grandlyon.com/apoyen/sdk-go/internal/rootmux" - "github.com/nicolaspernoud/vestibule/pkg/log" + "forge.grandlyon.com/apoyen/sdk-go/pkg/log" "golang.org/x/crypto/acme/autocert" ) diff --git a/pkg/auth/auth.go b/pkg/auth/auth.go index 8ea2fab..5ae0952 100644 --- a/pkg/auth/auth.go +++ b/pkg/auth/auth.go @@ -11,7 +11,7 @@ import ( "strings" "time" - "github.com/nicolaspernoud/vestibule/pkg/tokens" + "forge.grandlyon.com/apoyen/sdk-go/pkg/tokens" ) type key int diff --git a/pkg/auth/auth_test.go b/pkg/auth/auth_test.go index 968c80c..3c6cc34 100644 --- a/pkg/auth/auth_test.go +++ b/pkg/auth/auth_test.go @@ -3,7 +3,7 @@ package auth import ( "testing" - "github.com/nicolaspernoud/vestibule/pkg/tester" + "forge.grandlyon.com/apoyen/sdk-go/pkg/tester" ) var noH = tester.Header{Key: "", Value: ""} diff --git a/pkg/auth/inmemory.go b/pkg/auth/inmemory.go index 140ddc1..70aab98 100644 --- a/pkg/auth/inmemory.go +++ b/pkg/auth/inmemory.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "github.com/nicolaspernoud/vestibule/pkg/common" - "github.com/nicolaspernoud/vestibule/pkg/log" - "github.com/nicolaspernoud/vestibule/pkg/tokens" + "forge.grandlyon.com/apoyen/sdk-go/pkg/common" + "forge.grandlyon.com/apoyen/sdk-go/pkg/log" + "forge.grandlyon.com/apoyen/sdk-go/pkg/tokens" "golang.org/x/crypto/bcrypt" ) diff --git a/pkg/auth/oauth2.go b/pkg/auth/oauth2.go index 73a1f39..73b04e7 100644 --- a/pkg/auth/oauth2.go +++ b/pkg/auth/oauth2.go @@ -9,9 +9,9 @@ import ( "strings" "time" - "github.com/nicolaspernoud/vestibule/pkg/common" - "github.com/nicolaspernoud/vestibule/pkg/log" - "github.com/nicolaspernoud/vestibule/pkg/tokens" + "forge.grandlyon.com/apoyen/sdk-go/pkg/common" + "forge.grandlyon.com/apoyen/sdk-go/pkg/log" + "forge.grandlyon.com/apoyen/sdk-go/pkg/tokens" "golang.org/x/oauth2" ) diff --git a/pkg/tokens/tokens.go b/pkg/tokens/tokens.go index 3cd3517..550dff6 100644 --- a/pkg/tokens/tokens.go +++ b/pkg/tokens/tokens.go @@ -16,8 +16,8 @@ import ( "strings" "time" - "github.com/nicolaspernoud/vestibule/pkg/common" - "github.com/nicolaspernoud/vestibule/pkg/log" + "forge.grandlyon.com/apoyen/sdk-go/pkg/common" + "forge.grandlyon.com/apoyen/sdk-go/pkg/log" ) var ( diff --git a/pkg/tokens/tokens_test.go b/pkg/tokens/tokens_test.go index 0567864..dc7b630 100644 --- a/pkg/tokens/tokens_test.go +++ b/pkg/tokens/tokens_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/nicolaspernoud/vestibule/pkg/common" + "forge.grandlyon.com/apoyen/sdk-go/pkg/common" ) type user struct { diff --git a/web/index.html b/web/index.html index 438ffb3..f8494dc 100644 --- a/web/index.html +++ b/web/index.html @@ -28,27 +28,7 @@ <div class="navbar-brand"> <div class="navbar-item"> <div class="buttons"> - <a class="button is-primary" href="https://www.github.com/nicolaspernoud/Vestibule" target="_blank" rel="noopener noreferrer"> - <span class="icon"> - <svg - class="svg-inline--fa fa-github fa-w-16" - aria-hidden="true" - focusable="false" - data-prefix="fab" - data-icon="github" - role="img" - xmlns="http://www.w3.org/2000/svg" - viewBox="0 0 496 512" - data-fa-i2svg="" - > - <path - fill="currentColor" - d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z" - ></path></svg - > - </span> - </a> - <a class="button is-danger" href="https://forge.grandlyon.com/NPERNOUD/vestibule" target="_blank" rel="noopener noreferrer"> + <a class="button is-danger" href="https://forge.grandlyon.com/apoyen/sdk-go" target="_blank" rel="noopener noreferrer"> <span class="icon"> <svg class="svg-inline--fa fa-gitlab fa-w-16" -- GitLab