Commit c2034eeb authored by Sietse Ringers's avatar Sietse Ringers
Browse files

NewSession is now a CredentialManager method

parent 1d75fcb4
......@@ -85,13 +85,13 @@ func calcVersion(qr *Qr) (string, error) {
}
// NewSession creates and starts a new IRMA session.
func NewSession(credManager *CredentialManager, qr *Qr, handler Handler) {
func (cm *CredentialManager) NewSession(qr *Qr, handler Handler) {
session := &session{
Action: Action(qr.Type),
ServerURL: qr.URL,
Handler: handler,
transport: NewHTTPTransport(qr.URL),
credManager: credManager,
credManager: cm,
}
version, err := calcVersion(qr)
if err != nil {
......
......@@ -175,7 +175,7 @@ func sessionHelper(t *testing.T, jwtcontents interface{}, url string, manager *C
qr.URL = url + "/" + qr.URL
c := make(chan *SessionError)
NewSession(manager, qr, TestHandler{t, c, manager})
manager.NewSession(qr, TestHandler{t, c, manager})
if err := <-c; err != nil {
t.Fatal(*err)
......
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