Commit 53d543b0 authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Move StartSession method to tests

parent 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
}
......@@ -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"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment