Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new OAuth endpoint for login #4267

Merged
merged 1 commit into from
May 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions components/local-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,3 @@ docker run --rm -it -v /tmp/dest:/out eu.gcr.io/gitpod-core-dev/build/local-app:
cd components/local-app
BROWSER= GITPOD_HOST=<URL-of-your-preview-env> go run main.go --mock-keyring run
```

## To test the OAuth server
NOTE: needs to done locally as we cannot open a browser URL within a Gitpod workspace terminal atm
```
cd ~/
mkdir -p ~/tmp
docker pull eu.gcr.io/gitpod-core-dev/dev/local-app:rl-oauth
docker run --rm -it -v ~/tmp:/out eu.gcr.io/gitpod-core-dev/dev/local-app:rl-oauth
# assuming you are running on OSX... (use local-app-windows.exe or local-app-linux as required)
GITPOD_HOST=<URL-of-your-preview-env> ./tmp/local-app-darwin test
```
If successful it will output an OAuth token containing a Gitpod token e.g.:
```
{"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjaWQiOiJHaXRwb2QgbG9jYWwgY29udHJvbCBjbGllbnQiLCJzY29wZSI6ImZ1bmN0aW9uOmdldFdvcmtzcGFjZSIsInN1YiI6IjNjMTcwZjg3LWI2MTUtNDUwNS04MDFiLTUxZjczMjc5MzI5MSIsImV4cCI6MTYyMTMzNTc0NywibmJmIjoxNjIxMjQ5MzQ3LCJpYXQiOjE2MjEyNDkzNDcsImp0aSI6IjdmYzJjZTdjOWUwNjA0MGE0ZTBmOWI1OTI0NTFiYzhhYzMyMWRhZWEzMmMzZmZiZTZmMWI4OTFmNDBmMSJ9.gLVuo2pqQNQM7JKlfl-L9FaxbyGjNzTy5RHulOrGMZQ", "expires_in":86400, "refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRfaWQiOiJncGxjdGwtMS4wIiwiYWNjZXNzX3Rva2VuX2lkIjoiN2ZjMmNlN2M5ZTA2MDQwYTRlMGY5YjU5MjQ1MWJjOGFjMzIxZGFlYTMyYzNmZmJlNmYxYjg5MWY0MGYxIiwicmVmcmVzaF90b2tlbl9pZCI6InJlZnJlc2h0b2tlbnRva2VuIiwic2NvcGUiOiJmdW5jdGlvbjpnZXRXb3Jrc3BhY2UiLCJ1c2VyX2lkIjoiM2MxNzBmODctYjYxNS00NTA1LTgwMWItNTFmNzMyNzkzMjkxIiwiZXhwaXJlX3RpbWUiOjE2MjM4NDEzNDcsImlhdCI6MTYyMTI0OTM0Nn0.ioLDJhzSwO-QmepMur_yl-WFqMCkFD_pY9pczLFqA1M", "scope":"function:getWorkspace", "token_type":"Bearer"}
```
11 changes: 2 additions & 9 deletions components/local-app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"github.com/gitpod-io/local-app/pkg/bastion"
"github.com/gorilla/handlers"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
"github.com/zalando/go-keyring"
cli "github.com/urfave/cli/v2"
keyring "github.com/zalando/go-keyring"
)

var (
Expand Down Expand Up @@ -75,13 +75,6 @@ func main() {
},
},
},
{
Name: "test",
Action: func(c *cli.Context) error {
testOAuth(c.String("gitpod-host"))
return nil
},
},
},
}
err := app.Run(os.Args)
Expand Down
208 changes: 0 additions & 208 deletions components/local-app/oauth.go

This file was deleted.

Loading