Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
autom8ter committed Mar 4, 2021
1 parent 4491255 commit 3517dcf
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.0.2
current_version = 0.0.3
commit = False
tag = False

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version := "0.0.2"
version := "0.0.3"

.DEFAULT_GOAL := help

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ An oauth2 protected [graphQL playground](https://github.com/graphql/graphql-play

### Binary Release

Please see [releases](https://github.com/autom8ter/oauth-graphql-playground/releases/tag/v0.0.2) to download and add the program to your path directly
Please see [releases](https://github.com/autom8ter/oauth-graphql-playground/releases/tag/v0.0.3) to download and add the program to your path directly

#### Using Containers

- Docker: `docker pull colemanword:oauth-graphql-playground:v0.0.2`
- Docker: `docker pull colemanword:oauth-graphql-playground:v0.0.3`

- [sample k8s manifest](k8s.yaml)

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.7'
services:
oauth-graphql-playground:
image: colemanword/oauth-graphql-playground:v0.0.2
image: colemanword/oauth-graphql-playground:v0.0.3
env_file:
- ./.env
ports:
Expand Down
19 changes: 1 addition & 18 deletions internal/playground/playground.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,25 +83,8 @@ func (p *Playground) Playground() http.HandlerFunc {
}
return
}
token, err := p.session.GetToken(req)
if err != nil {
p.logger.Error("playground: failed to get token - redirecting", zap.Error(err))
if err := p.session.RedirectLogin(w, req); err != nil {
p.logger.Error("playground: failed to redirect", zap.Error(err))
}
return
}
w.Header().Add("Content-Type", "text/html")
if p.useIDToken {
playground.Execute(w, map[string]string{
"token": token.IDToken,
})
} else {
playground.Execute(w, map[string]string{
"token": token.Token.AccessToken,
})
}

playground.Execute(w, map[string]string{})
}
}

Expand Down
2 changes: 1 addition & 1 deletion internal/version/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package version

const Version = "0.0.2"
const Version = "0.0.3"
2 changes: 1 addition & 1 deletion k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
image: "colemanword/oauth-graphql-playground:v0.0.2"
image: "colemanword/oauth-graphql-playground:v0.0.3"
imagePullPolicy: Always
ports:
- containerPort: 5000
Expand Down

0 comments on commit 3517dcf

Please sign in to comment.