Skip to content
GitLab
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
53d543b0
Commit
53d543b0
authored
Sep 01, 2017
by
Sietse Ringers
Browse files
Move StartSession method to tests
parent
3b7621ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
protocol/server.go
deleted
100644 → 0
View file @
3b7621ea
package
protocol
// StartSession starts an IRMA session by posting the request,
// and retrieving the QR contents from the specified url.
func
StartSession
(
request
interface
{},
url
string
)
(
*
Qr
,
error
)
{
server
:=
NewHTTPTransport
(
url
)
var
response
Qr
err
:=
server
.
Post
(
""
,
&
response
,
request
)
if
err
!=
nil
{
return
nil
,
err
}
return
&
response
,
nil
}
protocol/session_test.go
View file @
53d543b0
...
...
@@ -145,6 +145,18 @@ func getIssuanceJwt(name string, id irmago.AttributeTypeIdentifier) interface{}
})
}
// StartSession starts an IRMA session by posting the request,
// and retrieving the QR contents from the specified url.
func
StartSession
(
request
interface
{},
url
string
)
(
*
Qr
,
error
)
{
server
:=
NewHTTPTransport
(
url
)
var
response
Qr
err
:=
server
.
Post
(
""
,
&
response
,
request
)
if
err
!=
nil
{
return
nil
,
err
}
return
&
response
,
nil
}
func
TestSigningSession
(
t
*
testing
.
T
)
{
id
:=
irmago
.
NewAttributeTypeIdentifier
(
"irma-demo.RU.studentCard.studentID"
)
name
:=
"testsigclient"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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