Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
bc84be70
Commit
bc84be70
authored
Apr 14, 2018
by
Tomas
Browse files
Add a Stack method to SessionError to get strack traces out, if any.
parent
41252c34
Changes
1
Hide whitespace changes
Inline
Side-by-side
messages.go
View file @
bc84be70
...
...
@@ -166,6 +166,14 @@ func (e *SessionError) Error() string {
return
buffer
.
String
()
}
func
(
e
*
SessionError
)
Stack
()
string
{
if
withStack
,
ok
:=
e
.
Err
.
(
*
errors
.
Error
);
ok
{
return
string
(
withStack
.
Stack
())
}
return
""
}
func
JwtDecode
(
jwt
string
,
body
interface
{})
error
{
jwtparts
:=
strings
.
Split
(
jwt
,
"."
)
if
jwtparts
==
nil
||
len
(
jwtparts
)
<
2
{
...
...
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