import ch.nevis.esauth.auth.engine.AuthResponse
import ch.nevis.esauth.util.httpclient.api.HttpClient

if (outargs['out.JWTToken']) {
    // we have a token
    def header = "Bearer ${outargs['out.JWTToken']}"
    response.setNote('agov.test.token', header)
    notes.setProperty('agov.test.token', header)
    response.removeOutArg('out.JWTToken')
}

// if (!response.getNote('agov.test.token')) {
//    response.setResult('newToken')
//    return
//}


// show the GUI
response.setResult('display')
