Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
dex
Commits
01f95db3
Commit
01f95db3
authored
Aug 27, 2015
by
Yifan Gu
Committed by
Yifan Gu
Aug 29, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples: also print raw token in the result.
parent
3da456ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
main.go
examples/app/main.go
+3
-3
No files found.
examples/app/main.go
View file @
01f95db3
...
@@ -30,7 +30,7 @@ func main() {
...
@@ -30,7 +30,7 @@ func main() {
redirectURL
:=
fs
.
String
(
"redirect-url"
,
"http://127.0.0.1:5555/callback"
,
""
)
redirectURL
:=
fs
.
String
(
"redirect-url"
,
"http://127.0.0.1:5555/callback"
,
""
)
clientID
:=
fs
.
String
(
"client-id"
,
""
,
""
)
clientID
:=
fs
.
String
(
"client-id"
,
""
,
""
)
clientSecret
:=
fs
.
String
(
"client-secret"
,
""
,
""
)
clientSecret
:=
fs
.
String
(
"client-secret"
,
""
,
""
)
caFile
:=
fs
.
String
(
"ca-file"
,
""
,
"the TLS CA file, if empty then the host's root CA will be used"
)
caFile
:=
fs
.
String
(
"
trusted-
ca-file"
,
""
,
"the TLS CA file, if empty then the host's root CA will be used"
)
discovery
:=
fs
.
String
(
"discovery"
,
"https://accounts.google.com"
,
""
)
discovery
:=
fs
.
String
(
"discovery"
,
"https://accounts.google.com"
,
""
)
logDebug
:=
fs
.
Bool
(
"log-debug"
,
false
,
"log debug-level information"
)
logDebug
:=
fs
.
Bool
(
"log-debug"
,
false
,
"log debug-level information"
)
...
@@ -245,9 +245,9 @@ func handleCallbackFunc(c *oidc.Client) http.HandlerFunc {
...
@@ -245,9 +245,9 @@ func handleCallbackFunc(c *oidc.Client) http.HandlerFunc {
return
return
}
}
s
:=
fmt
.
Sprintf
(
`<html><body>
Claims: %v <br
>
s
:=
fmt
.
Sprintf
(
`<html><body>
<p>Token: %v</p><p>Claims: %v </p
>
<a href="/resend?jwt=%s">Resend Verification Email</a>
<a href="/resend?jwt=%s">Resend Verification Email</a>
</body></html>`
,
claims
,
tok
.
Encode
())
</body></html>`
,
tok
.
Encode
(),
claims
,
tok
.
Encode
())
w
.
Write
([]
byte
(
s
))
w
.
Write
([]
byte
(
s
))
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment