Test Info

Issuerhttps://oidc-test.ergon.ch
Profile[]
Test IDOP-OAuth-2nd-30s
Test descriptionTrying to use authorization code twice with 30 seconds in between uses must result in an error
Timestamp2020-02-03T17:03:07Z

Conditions


check-http-error-response: status=OK [Checks that an error code is either 400 or 401 which are the only ones accepted by OAuth2/OIDC.]
verify-response: status=OK [Checks that the last response was one of a possible set of OpenID Connect Responses]
Done: status=OK

Trace Output

0phase<--<-- 0 --- Note -->-->
8phase<--<-- 1 --- Webfinger -->-->
8not expected to doWebFinger
8phase<--<-- 2 --- Discovery -->-->
8not expected to doDynamic discovery
8phase<--<-- 3 --- Registration -->-->
8not expected to doDynamic registration
8phase<--<-- 4 --- AsyncAuthn -->-->
8AuthorizationRequest
{
    "client_id": "oidcConformance_clientId",
    "nonce": "hsGIEOjC2ZZcimIq",
    "redirect_uri": "https://op.certification.openid.net:60272/authz_cb",
    "response_type": "code",
    "scope": "openid",
    "state": "jfAk1ytlMJeaqKaj"
}
8redirect urlhttps://oidc-test.ergon.ch/auth-oidc/oauth2/oidcConformance_clientId?state=jfAk1ytlMJeaqKaj&nonce=hsGIEOjC2ZZcimIq&response_type=code&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A60272%2Fauthz_cb&client_id=oidcConformance_clientId
8redirecthttps://oidc-test.ergon.ch/auth-oidc/oauth2/oidcConformance_clientId?state=jfAk1ytlMJeaqKaj&nonce=hsGIEOjC2ZZcimIq&response_type=code&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A60272%2Fauthz_cb&client_id=oidcConformance_clientId
9responseResponse URL with query part
9response{'code': 'WuTjANFpe7UIWIr8fJa8Q2A2_mA~HR7b4CuCGwLmj-tgbLxnjnzEbX9BuIw8m0llJzQp', 'state': 'jfAk1ytlMJeaqKaj'}
9response{'code': 'WuTjANFpe7UIWIr8fJa8Q2A2_mA~HR7b4CuCGwLmj-tgbLxnjnzEbX9BuIw8m0llJzQp', 'state': 'jfAk1ytlMJeaqKaj'}
9AuthorizationResponse
{
    "code": "WuTjANFpe7UIWIr8fJa8Q2A2_mA~HR7b4CuCGwLmj-tgbLxnjnzEbX9BuIw8m0llJzQp",
    "state": "jfAk1ytlMJeaqKaj"
}
9phase<--<-- 5 --- AccessToken -->-->
9requestop_args: {'state': 'jfAk1ytlMJeaqKaj'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:60272/authz_cb'}
9do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:60272/authz_cb', 'code': 'WuTjANFpe7UIWIr8fJa8Q2A2_mA~HR7b4CuCGwLmj-tgbLxnjnzEbX9BuIw8m0llJzQp', 'state': 'jfAk1ytlMJeaqKaj', 'grant_type': 'authorization_code', 'client_id': 'oidcConformance_clientId'}, 'state': 'jfAk1ytlMJeaqKaj', 'authn_method': 'client_secret_basic'}
9AccessTokenRequest
{
    "code": "WuTjANFpe7UIWIr8fJa8Q2A2_mA~HR7b4CuCGwLmj-tgbLxnjnzEbX9BuIw8m0llJzQp",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:60272/authz_cb",
    "state": "jfAk1ytlMJeaqKaj"
}
9request_urlhttps://oidc-test.ergon.ch/auth-oidc/oauth2/oidcConformance_clientId
9request_http_args{'headers': {'Authorization': 'Basic b2lkY0NvbmZvcm1hbmNlX2NsaWVudElkOml4MG9vQ2hlX2VlcmUxTXVrX29vamVpOUllX0VpdGhhaTRq', 'Content-Type': 'application/x-www-form-urlencoded'}}
9requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A60272%2Fauthz_cb&code=WuTjANFpe7UIWIr8fJa8Q2A2_mA%7EHR7b4CuCGwLmj-tgbLxnjnzEbX9BuIw8m0llJzQp&state=jfAk1ytlMJeaqKaj
9http response
url:https://oidc-test.ergon.ch/auth-oidc/oauth2/oidcConformance_clientId status_code:200
9response{'access_token': 'e7muQEO3LO8GtS34MX8lYwyfivc~5w3bmSxTv3F908NaYmVjfc6W662fc53GJ_yoUO-2', 'refresh_token': 'XTZjOghlD-5Fac_txgpUHTjFa8c~GNn1cCu2grmrW_B1qRmjgWejazEGlBVlrt2FvKBK', 'id_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJtaWtlIiwiYXVkIjoib2lkY0NvbmZvcm1hbmNlX2NsaWVudElkIiwiYXV0aF90aW1lIjoxNTgwNzQ5MjAxLCJpc3MiOiJodHRwczpcL1wvb2lkYy10ZXN0LmVyZ29uLmNoIiwiZXhwIjoxNTgwNzQ5NDc2LCJpYXQiOjE1ODA3NDkzNTYsIm5vbmNlIjoiaHNHSUVPakMyWlpjaW1JcSJ9.Km2hqWaphrcuQbD1xpCFOrxfIgBJYGJmHQmhqdNWKQM', 'token_type': 'bearer', 'expires_in': 179}
10AccessTokenResponse
{
    "access_token": "e7muQEO3LO8GtS34MX8lYwyfivc~5w3bmSxTv3F908NaYmVjfc6W662fc53GJ_yoUO-2",
    "expires_in": 179,
    "id_token": {
        "aud": [
            "oidcConformance_clientId"
        ],
        "auth_time": 1580749201,
        "exp": 1580749476,
        "iat": 1580749356,
        "iss": "https://oidc-test.ergon.ch",
        "nonce": "hsGIEOjC2ZZcimIq",
        "sub": "mike"
    },
    "refresh_token": "XTZjOghlD-5Fac_txgpUHTjFa8c~GNn1cCu2grmrW_B1qRmjgWejazEGlBVlrt2FvKBK",
    "token_type": "bearer"
}
10jws header{'typ': 'JWT', 'alg': 'HS256'}
10phase<--<-- 6 --- TimeDelay -->-->
40phase<--<-- 7 --- AccessToken -->-->
40requestop_args: {'state': 'jfAk1ytlMJeaqKaj'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:60272/authz_cb'}
40do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:60272/authz_cb', 'code': 'WuTjANFpe7UIWIr8fJa8Q2A2_mA~HR7b4CuCGwLmj-tgbLxnjnzEbX9BuIw8m0llJzQp', 'state': 'jfAk1ytlMJeaqKaj', 'grant_type': 'authorization_code', 'client_id': 'oidcConformance_clientId'}, 'state': 'jfAk1ytlMJeaqKaj', 'authn_method': 'client_secret_basic'}
40AccessTokenRequest
{
    "code": "WuTjANFpe7UIWIr8fJa8Q2A2_mA~HR7b4CuCGwLmj-tgbLxnjnzEbX9BuIw8m0llJzQp",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:60272/authz_cb",
    "state": "jfAk1ytlMJeaqKaj"
}
40request_urlhttps://oidc-test.ergon.ch/auth-oidc/oauth2/oidcConformance_clientId
40request_http_args{'headers': {'Authorization': 'Basic b2lkY0NvbmZvcm1hbmNlX2NsaWVudElkOml4MG9vQ2hlX2VlcmUxTXVrX29vamVpOUllX0VpdGhhaTRq', 'Content-Type': 'application/x-www-form-urlencoded'}}
40requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A60272%2Fauthz_cb&code=WuTjANFpe7UIWIr8fJa8Q2A2_mA%7EHR7b4CuCGwLmj-tgbLxnjnzEbX9BuIw8m0llJzQp&state=jfAk1ytlMJeaqKaj
40http response
url:https://oidc-test.ergon.ch/auth-oidc/oauth2/oidcConformance_clientId status_code:400 message:{"error":"invalid_grant"}
40response{'error': 'invalid_grant'}
40eventGot expected error
40TokenErrorResponse
{
    "error": "invalid_grant"
}
40phase<--<-- 8 --- Done -->-->
40end
40assertionCheckHTTPErrorResponse
40conditioncheck-http-error-response: status=OK [Checks that an error code is either 400 or 401 which are the only ones accepted by OAuth2/OIDC.]
40assertionVerifyResponse
40conditionverify-response: status=OK [Checks that the last response was one of a possible set of OpenID Connect Responses]
40conditionDone: status=OK

Result

PASSED