Test Info

Issuerhttps://oidc-test.ergon.ch
Profile[]
Test IDOP-OAuth-2nd-Revokes
Test descriptionTrying to use authorization code twice should result in revoking previously issued access tokens
Timestamp2020-02-03T17:03:39Z

Conditions


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 --- Webfinger -->-->
0not expected to doWebFinger
0phase<--<-- 1 --- Discovery -->-->
0not expected to doDynamic discovery
0phase<--<-- 2 --- Registration -->-->
0not expected to doDynamic registration
0phase<--<-- 3 --- Note -->-->
4phase<--<-- 4 --- AsyncAuthn -->-->
4AuthorizationRequest
{
    "client_id": "oidcConformance_clientId",
    "nonce": "5VsdMfx1hKBnpSJ4",
    "redirect_uri": "https://op.certification.openid.net:60272/authz_cb",
    "response_type": "code",
    "scope": "openid",
    "state": "ZDbkahAsVfTF37Aj"
}
4redirect urlhttps://oidc-test.ergon.ch/auth-oidc/oauth2/oidcConformance_clientId?state=ZDbkahAsVfTF37Aj&nonce=5VsdMfx1hKBnpSJ4&response_type=code&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A60272%2Fauthz_cb&client_id=oidcConformance_clientId
4redirecthttps://oidc-test.ergon.ch/auth-oidc/oauth2/oidcConformance_clientId?state=ZDbkahAsVfTF37Aj&nonce=5VsdMfx1hKBnpSJ4&response_type=code&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A60272%2Fauthz_cb&client_id=oidcConformance_clientId
4responseResponse URL with query part
4response{'code': 'R6V4kiFFEjKCHeAnbzgFPO7cy2Y~75FDWDK5Zx4v9aYJYsy4OePiHf21rojlvkqvVF6W', 'state': 'ZDbkahAsVfTF37Aj'}
4response{'code': 'R6V4kiFFEjKCHeAnbzgFPO7cy2Y~75FDWDK5Zx4v9aYJYsy4OePiHf21rojlvkqvVF6W', 'state': 'ZDbkahAsVfTF37Aj'}
4AuthorizationResponse
{
    "code": "R6V4kiFFEjKCHeAnbzgFPO7cy2Y~75FDWDK5Zx4v9aYJYsy4OePiHf21rojlvkqvVF6W",
    "state": "ZDbkahAsVfTF37Aj"
}
4phase<--<-- 5 --- AccessToken -->-->
4requestop_args: {'state': 'ZDbkahAsVfTF37Aj'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:60272/authz_cb'}
4do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:60272/authz_cb', 'code': 'R6V4kiFFEjKCHeAnbzgFPO7cy2Y~75FDWDK5Zx4v9aYJYsy4OePiHf21rojlvkqvVF6W', 'state': 'ZDbkahAsVfTF37Aj', 'grant_type': 'authorization_code', 'client_id': 'oidcConformance_clientId'}, 'state': 'ZDbkahAsVfTF37Aj', 'authn_method': 'client_secret_basic'}
4AccessTokenRequest
{
    "code": "R6V4kiFFEjKCHeAnbzgFPO7cy2Y~75FDWDK5Zx4v9aYJYsy4OePiHf21rojlvkqvVF6W",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:60272/authz_cb",
    "state": "ZDbkahAsVfTF37Aj"
}
4request_urlhttps://oidc-test.ergon.ch/auth-oidc/oauth2/oidcConformance_clientId
4request_http_args{'headers': {'Authorization': 'Basic b2lkY0NvbmZvcm1hbmNlX2NsaWVudElkOml4MG9vQ2hlX2VlcmUxTXVrX29vamVpOUllX0VpdGhhaTRq', 'Content-Type': 'application/x-www-form-urlencoded'}}
4requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A60272%2Fauthz_cb&code=R6V4kiFFEjKCHeAnbzgFPO7cy2Y%7E75FDWDK5Zx4v9aYJYsy4OePiHf21rojlvkqvVF6W&state=ZDbkahAsVfTF37Aj
5http response
url:https://oidc-test.ergon.ch/auth-oidc/oauth2/oidcConformance_clientId status_code:200
5response{'access_token': 'uMXa1c6tp11opST_DhoL2Jur3tE~Sk5lXXc4PkwPXSSVyn3XLTYtPgYbQKJu0ypYrNWP', 'refresh_token': 'iiD3senOhRGsDihW5LWmR9UUzM8~FoYfBZuoExFwEM4FGrJ59_iqPf8f-yvJDC_1G6hE', 'id_token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJtaWtlIiwiYXVkIjoib2lkY0NvbmZvcm1hbmNlX2NsaWVudElkIiwiYXV0aF90aW1lIjoxNTgwNzQ5MjAxLCJpc3MiOiJodHRwczpcL1wvb2lkYy10ZXN0LmVyZ29uLmNoIiwiZXhwIjoxNTgwNzQ5NTM3LCJpYXQiOjE1ODA3NDk0MTcsIm5vbmNlIjoiNVZzZE1meDFoS0JucFNKNCJ9.-Ob3EhTFkXeayq_LlfgXxFCy-4IEzXbFWYb6JVtGMRM', 'token_type': 'bearer', 'expires_in': 179}
5AccessTokenResponse
{
    "access_token": "uMXa1c6tp11opST_DhoL2Jur3tE~Sk5lXXc4PkwPXSSVyn3XLTYtPgYbQKJu0ypYrNWP",
    "expires_in": 179,
    "id_token": {
        "aud": [
            "oidcConformance_clientId"
        ],
        "auth_time": 1580749201,
        "exp": 1580749537,
        "iat": 1580749417,
        "iss": "https://oidc-test.ergon.ch",
        "nonce": "5VsdMfx1hKBnpSJ4",
        "sub": "mike"
    },
    "refresh_token": "iiD3senOhRGsDihW5LWmR9UUzM8~FoYfBZuoExFwEM4FGrJ59_iqPf8f-yvJDC_1G6hE",
    "token_type": "bearer"
}
5jws header{'typ': 'JWT', 'alg': 'HS256'}
5phase<--<-- 6 --- AccessToken -->-->
5requestop_args: {'state': 'ZDbkahAsVfTF37Aj'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:60272/authz_cb'}
5do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:60272/authz_cb', 'code': 'R6V4kiFFEjKCHeAnbzgFPO7cy2Y~75FDWDK5Zx4v9aYJYsy4OePiHf21rojlvkqvVF6W', 'state': 'ZDbkahAsVfTF37Aj', 'grant_type': 'authorization_code', 'client_id': 'oidcConformance_clientId'}, 'state': 'ZDbkahAsVfTF37Aj', 'authn_method': 'client_secret_basic'}
5AccessTokenRequest
{
    "code": "R6V4kiFFEjKCHeAnbzgFPO7cy2Y~75FDWDK5Zx4v9aYJYsy4OePiHf21rojlvkqvVF6W",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:60272/authz_cb",
    "state": "ZDbkahAsVfTF37Aj"
}
5request_urlhttps://oidc-test.ergon.ch/auth-oidc/oauth2/oidcConformance_clientId
5request_http_args{'headers': {'Authorization': 'Basic b2lkY0NvbmZvcm1hbmNlX2NsaWVudElkOml4MG9vQ2hlX2VlcmUxTXVrX29vamVpOUllX0VpdGhhaTRq', 'Content-Type': 'application/x-www-form-urlencoded'}}
5requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A60272%2Fauthz_cb&code=R6V4kiFFEjKCHeAnbzgFPO7cy2Y%7E75FDWDK5Zx4v9aYJYsy4OePiHf21rojlvkqvVF6W&state=ZDbkahAsVfTF37Aj
6http response
url:https://oidc-test.ergon.ch/auth-oidc/oauth2/oidcConformance_clientId status_code:400 message:{"error":"invalid_grant"}
6response{'error': 'invalid_grant'}
6eventGot expected error
6TokenErrorResponse
{
    "error": "invalid_grant"
}
6phase<--<-- 7 --- UserInfo -->-->
6do_user_info_request
kwargs:{'state': 'ZDbkahAsVfTF37Aj', 'method': 'GET', 'authn_method': 'bearer_header'}
6request{'body': None}
6request_urlhttps://oidc-test.ergon.ch/auth-oidc/oauth2/oidcConformance_clientId/userinfo
6request_http_args{'headers': {'Authorization': 'Bearer uMXa1c6tp11opST_DhoL2Jur3tE~Sk5lXXc4PkwPXSSVyn3XLTYtPgYbQKJu0ypYrNWP'}}
6http response
url:https://oidc-test.ergon.ch/auth-oidc/oauth2/oidcConformance_clientId/userinfo status_code:401
6eventGot expected error
6ErrorResponse
{
    "error": "invalid_token",
    "error_description": "Server returned 401 Unauthorized. WWW-Authenticate header:Bearer error=\"invalid_token\", error_description=\"Invalid access token\""
}
6ErrorResponse
{
    "error": "invalid_token",
    "error_description": "Server returned 401 Unauthorized. WWW-Authenticate header:Bearer error=\"invalid_token\", error_description=\"Invalid access token\""
}
6phase<--<-- 8 --- Done -->-->
6end
6assertionVerifyResponse
6conditionverify-response: status=OK [Checks that the last response was one of a possible set of OpenID Connect Responses]
6conditionDone: status=OK

Result

PASSED