Test Info

Issuerhttps://idp.armls.com
Profile[]
Test IDOP-OAuth-2nd-30s
Test descriptionTrying to use authorization code twice with 30 seconds in between uses must result in an error
Timestamp2019-02-21T22:14:41Z

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 -->-->
6phase<--<-- 1 --- Webfinger -->-->
6not expected to doWebFinger
6phase<--<-- 2 --- Discovery -->-->
6not expected to doDynamic discovery
6phase<--<-- 3 --- Registration -->-->
6not expected to doDynamic registration
6phase<--<-- 4 --- AsyncAuthn -->-->
6AuthorizationRequest
{
    "client_id": "op.certification.openid.net",
    "nonce": "Bh8kAaLiZ1eZrt71",
    "redirect_uri": "https://op.certification.openid.net:61504/authz_cb",
    "response_type": "code",
    "scope": "openid",
    "state": "vDbkatlBLaz3VSnC"
}
6redirect urlhttps://idp.armls.com/connect/authorize?state=vDbkatlBLaz3VSnC&nonce=Bh8kAaLiZ1eZrt71&response_type=code&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61504%2Fauthz_cb&client_id=op.certification.openid.net
6redirecthttps://idp.armls.com/connect/authorize?state=vDbkatlBLaz3VSnC&nonce=Bh8kAaLiZ1eZrt71&response_type=code&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61504%2Fauthz_cb&client_id=op.certification.openid.net
6responseResponse URL with query part
6response{'code': '932af7ce13b8574f8b490b9cce3941b29d5c9f07e25df96c68888535fe4543d7', 'scope': 'openid', 'state': 'vDbkatlBLaz3VSnC', 'session_state': 'irRGCKjhte0BISbtAZU3g3tzJCBrhOz8b8OskDwmZOE.74fffb2c0f1831fa07a3ba4bb5621208'}
6response{'code': '932af7ce13b8574f8b490b9cce3941b29d5c9f07e25df96c68888535fe4543d7', 'scope': 'openid', 'state': 'vDbkatlBLaz3VSnC', 'session_state': 'irRGCKjhte0BISbtAZU3g3tzJCBrhOz8b8OskDwmZOE.74fffb2c0f1831fa07a3ba4bb5621208'}
6AuthorizationResponse
{
    "code": "932af7ce13b8574f8b490b9cce3941b29d5c9f07e25df96c68888535fe4543d7",
    "scope": "openid",
    "session_state": "irRGCKjhte0BISbtAZU3g3tzJCBrhOz8b8OskDwmZOE.74fffb2c0f1831fa07a3ba4bb5621208",
    "state": "vDbkatlBLaz3VSnC"
}
6phase<--<-- 5 --- AccessToken -->-->
6requestop_args: {'state': 'vDbkatlBLaz3VSnC'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61504/authz_cb'}
6do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61504/authz_cb', 'code': '932af7ce13b8574f8b490b9cce3941b29d5c9f07e25df96c68888535fe4543d7', 'state': 'vDbkatlBLaz3VSnC', 'grant_type': 'authorization_code', 'client_id': 'op.certification.openid.net'}, 'state': 'vDbkatlBLaz3VSnC', 'authn_method': 'client_secret_basic'}
6AccessTokenRequest
{
    "code": "932af7ce13b8574f8b490b9cce3941b29d5c9f07e25df96c68888535fe4543d7",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61504/authz_cb",
    "state": "vDbkatlBLaz3VSnC"
}
6request_urlhttps://idp.armls.com/connect/token
6request_http_args{'headers': {'Authorization': 'Basic b3AuY2VydGlmaWNhdGlvbi5vcGVuaWQubmV0Om9wLmNlcnRpZmljYXRpb24ub3BlbmlkLm5ldA==', 'Content-Type': 'application/x-www-form-urlencoded'}}
6requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61504%2Fauthz_cb&code=932af7ce13b8574f8b490b9cce3941b29d5c9f07e25df96c68888535fe4543d7&state=vDbkatlBLaz3VSnC
6http response
url:https://idp.armls.com/connect/token status_code:200
6response{'id_token': 'eyJhbGciOiJSUzI1NiIsImtpZCI6IkUzOEMwRDRBMzgwNkI1NTMxQTRFN0Y3MTNDQ0ZBMjI2NEE3N0F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IjAyMDUxNjc1LTdERDMtNDQ2OS1BNDMzLURDRDNBN0VCN0I4OCIsImF1dGhfdGltZSI6MTU1MDc4NzIxNSwiaWRwIjoibG9jYWwiLCJzY29wZSI6WyJvcGVuaWQiXSwiYW1yIjpbImV4dGVybmFsIl19.Bp4QYEy9uogusB4tjGJ0_pFWO3EPjmGetHoQ5bG9xAvWMRIPX0u0JDXy_0TtKnlJkUD---8JTJvAvUW8CLiCiwWjtoVUEgC6cQb-D_eK9JWI4sZKxxhbVFnew-nTgso2VbuyIN1NNkMyUpX7FHRZ1ILWkAarDtKaRR_X9fClmdXmWkGHnWx7q4U_z9l0hYw8wuDM1oq0ILIFt-THdg0j2zw8VT7qsJQ6tGdBpw5J6dkGJ-cKqPieQqWluG46-G6ZmGYzVYuKuylPu8jH9FdwoojjRH8XI-iPDlvVE2JWaVAAzWCjr9-cCpe6CH7e4SYdrpgtvwvzkNqF1ymylGi36A",
    "expires_in": 3600,
    "id_token": {
        "amr": [
            "external"
        ],
        "at_hash": "NqpH-if6ALT6PtzO0IjXIg",
        "aud": [
            "op.certification.openid.net"
        ],
        "auth_time": 1550787215,
        "exp": 1550787550,
        "iat": 1550787250,
        "idp": "local",
        "iss": "https://idp.armls.com",
        "nbf": 1550787250,
        "nonce": "Bh8kAaLiZ1eZrt71",
        "sid": "92a968838beea806b5a40a95021cf961",
        "sub": "02051675-7DD3-4469-A433-DCD3A7EB7B88"
    },
    "token_type": "Bearer"
}
7jws header{'alg': 'RS256', 'kid': 'E38C0D4A3806B5531A4E7F713CCFA2264A77AB41', 'typ': 'JWT', 'x5t': '44wNSjgGtVMaTn9xPM-iJkp3q0E'}
7phase<--<-- 6 --- TimeDelay -->-->
37phase<--<-- 7 --- AccessToken -->-->
37requestop_args: {'state': 'vDbkatlBLaz3VSnC'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61504/authz_cb'}
37do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61504/authz_cb', 'code': '932af7ce13b8574f8b490b9cce3941b29d5c9f07e25df96c68888535fe4543d7', 'state': 'vDbkatlBLaz3VSnC', 'grant_type': 'authorization_code', 'client_id': 'op.certification.openid.net'}, 'state': 'vDbkatlBLaz3VSnC', 'authn_method': 'client_secret_basic'}
37AccessTokenRequest
{
    "code": "932af7ce13b8574f8b490b9cce3941b29d5c9f07e25df96c68888535fe4543d7",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61504/authz_cb",
    "state": "vDbkatlBLaz3VSnC"
}
37request_urlhttps://idp.armls.com/connect/token
37request_http_args{'headers': {'Authorization': 'Basic b3AuY2VydGlmaWNhdGlvbi5vcGVuaWQubmV0Om9wLmNlcnRpZmljYXRpb24ub3BlbmlkLm5ldA==', 'Content-Type': 'application/x-www-form-urlencoded'}}
37requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61504%2Fauthz_cb&code=932af7ce13b8574f8b490b9cce3941b29d5c9f07e25df96c68888535fe4543d7&state=vDbkatlBLaz3VSnC
37http response
url:https://idp.armls.com/connect/token status_code:400 message:{"error":"invalid_grant"}
37response{'error': 'invalid_grant'}
37eventGot expected error
37TokenErrorResponse
{
    "error": "invalid_grant"
}
37phase<--<-- 8 --- Done -->-->
37end
37assertionCheckHTTPErrorResponse
37conditioncheck-http-error-response: status=OK [Checks that an error code is either 400 or 401 which are the only ones accepted by OAuth2/OIDC.]
37assertionVerifyResponse
37conditionverify-response: status=OK [Checks that the last response was one of a possible set of OpenID Connect Responses]
37conditionDone: status=OK

Result

PASSED