Test Info

Test descriptionTrying to use authorization code twice with 30 seconds in between uses must result in an error
Profile[]
Test IDOP-OAuth-2nd-30s
Timestamp2017-12-18T21:08:40Z
Issuerhttps://oidctest.idautoengineering.net/idp

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

0.0phase<--<-- 0 --- Note -->-->
3.258phase<--<-- 1 --- Webfinger -->-->
3.258not expected to doWebFinger
3.259phase<--<-- 2 --- Discovery -->-->
3.259provider_config
kwargs:{'issuer': 'https://oidctest.idautoengineering.net/idp'}
3.309http response
url:https://oidctest.idautoengineering.net/idp/.well-known/openid-configuration status_code:200
3.31ProviderConfigurationResponse
{
    "authorization_endpoint": "https://oidctest.idautoengineering.net/idp/profile/oidc/auth",
    "claim_types_supported": [
        "normal"
    ],
    "claims_parameter_supported": false,
    "claims_supported": [
        "sub",
        "name",
        "given_name",
        "family_name",
        "email"
    ],
    "display_values_supported": [
        "page"
    ],
    "grant_types_supported": [
        "authorization_code"
    ],
    "id_token_signing_alg_values_supported": [
        "RS256"
    ],
    "issuer": "https://oidctest.idautoengineering.net/idp",
    "jwks_uri": "https://oidctest.idautoengineering.net/idp/profile/oidc/jwks",
    "request_parameter_supported": false,
    "request_uri_parameter_supported": true,
    "require_request_uri_registration": true,
    "response_modes_supported": [
        "query"
    ],
    "response_types_supported": [
        "code",
        "token",
        "id_token"
    ],
    "scopes_supported": [
        "openid"
    ],
    "subject_types_supported": [
        "public"
    ],
    "token_endpoint": "https://oidctest.idautoengineering.net/idp/profile/oidc/token",
    "token_endpoint_auth_methods_supported": [
        "client_secret_post",
        "client_secret_basic"
    ],
    "userinfo_endpoint": "https://oidctest.idautoengineering.net/idp/profile/oidc/userinfo",
    "userinfo_signing_alg_values_supported": [
        "RS256"
    ],
    "version": "3.0"
}
3.31phase<--<-- 3 --- Registration -->-->
3.31not expected to doDynamic registration
3.311phase<--<-- 4 --- AsyncAuthn -->-->
3.311AuthorizationRequest
{
    "client_id": "3000badf0c55d2cae7c22b3d63e3f667",
    "nonce": "QbXde0GUX9Rt7fdm",
    "redirect_uri": "https://op.certification.openid.net:60992/authz_cb",
    "response_type": "code",
    "scope": "openid",
    "state": "IHxyHNse2KNYtM5D"
}
3.311redirect urlhttps://oidctest.idautoengineering.net/idp/profile/oidc/auth?scope=openid&nonce=QbXde0GUX9Rt7fdm&state=IHxyHNse2KNYtM5D&response_type=code&client_id=3000badf0c55d2cae7c22b3d63e3f667&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A60992%2Fauthz_cb
3.311redirecthttps://oidctest.idautoengineering.net/idp/profile/oidc/auth?scope=openid&nonce=QbXde0GUX9Rt7fdm&state=IHxyHNse2KNYtM5D&response_type=code&client_id=3000badf0c55d2cae7c22b3d63e3f667&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A60992%2Fauthz_cb
3.587response{'code': 'koFsvBbJbm.-pPsWJZBvQygDuRGqZevVg9gxHWEQi.pIhGZfO8', 'state': 'IHxyHNse2KNYtM5D'}
3.588response{'code': 'koFsvBbJbm.-pPsWJZBvQygDuRGqZevVg9gxHWEQi.pIhGZfO8', 'state': 'IHxyHNse2KNYtM5D'}
3.588AuthorizationResponse
{
    "code": "koFsvBbJbm.-pPsWJZBvQygDuRGqZevVg9gxHWEQi.pIhGZfO8",
    "state": "IHxyHNse2KNYtM5D"
}
3.588phase<--<-- 5 --- AccessToken -->-->
3.588requestop_args: {'state': 'IHxyHNse2KNYtM5D'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:60992/authz_cb'}
3.588do_access_token_request
kwargs:{'request_args': {'code': 'koFsvBbJbm.-pPsWJZBvQygDuRGqZevVg9gxHWEQi.pIhGZfO8', 'state': 'IHxyHNse2KNYtM5D', 'grant_type': 'authorization_code', 'client_id': '3000badf0c55d2cae7c22b3d63e3f667', 'redirect_uri': 'https://op.certification.openid.net:60992/authz_cb'}, 'state': 'IHxyHNse2KNYtM5D'}
3.588AccessTokenRequest
{
    "client_id": "3000badf0c55d2cae7c22b3d63e3f667",
    "code": "koFsvBbJbm.-pPsWJZBvQygDuRGqZevVg9gxHWEQi.pIhGZfO8",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:60992/authz_cb",
    "state": "IHxyHNse2KNYtM5D"
}
3.589request_urlhttps://oidctest.idautoengineering.net/idp/profile/oidc/token
3.589request_http_args{'headers': {'Authorization': 'Basic MzAwMGJhZGYwYzU1ZDJjYWU3YzIyYjNkNjNlM2Y2Njc6ODY5N2E4OTlhYzFjNzYwODAyNmM4ZDEzN2E1YzMzYTAwM2RlMDA1MDc2MzBmMmQ2OGM5NTNlMTNkNzVlNjFiYg==', 'Content-Type': 'application/x-www-form-urlencoded'}}
3.589requestclient_id=3000badf0c55d2cae7c22b3d63e3f667&state=IHxyHNse2KNYtM5D&code=koFsvBbJbm.-pPsWJZBvQygDuRGqZevVg9gxHWEQi.pIhGZfO8&grant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A60992%2Fauthz_cb
3.621http response
url:https://oidctest.idautoengineering.net/idp/profile/oidc/token status_code:200
3.622response{'refresh_token': '+6~qGP//IKw+IO8Q_M.3wJWPI+l1hHyMG.MS4~k4.X-l1c_.cN', 'expires_in': 32399, 'scope': 'openid', 'access_token': 'M~g~0-jfmJ+Mwg5A3AnKI3R-hOYU67e/HXAQ_unhdQiv~y5Os4', 'id_token': 'eyJraWQiOiI2NTJlNjk1N2UxNzNmYzYxOTYxN2ZhMjNjMzZjYmFjNTRhNWZhNzhlNjBiNzA2Mjg5NmI2ZDgzNTdkNDVhOWYxIiwiYWxnIjoiUlMyNTYifQ.eyJpYXQiOjE1MTM2MzEyOTAsImV4cCI6MTUxMzYzMTM1MCwiaXNzIjoiaHR0cHM6Ly9vaWRjdGVzdC5pZGF1dG9lbmdpbmVlcmluZy5uZXQvaWRwIiwiYXVkIjoiMzAwMGJhZGYwYzU1ZDJjYWU3YzIyYjNkNjNlM2Y2NjciLCJzdWIiOiIyNjIwMjdhMC1hZjc3LTExZTctODc2ZC0wMjc0MGM1NDljY2EiLCJhdXRoX3RpbWUiOjE1MTM2MzEyMTUsIm5vbmNlIjoiUWJYZGUwR1VYOVJ0N2ZkbSIsImF6cCI6IjMwMDBiYWRmMGM1NWQyY2FlN2MyMmIzZDYzZTNmNjY3IiwibmFtZSI6IlN5c3RlbSBBZG1pbiIsImdpdmVuX25hbWUiOiJTeXN0ZW0iLCJmYW1pbHlfbmFtZSI6IkFkbWluIiwiZW1haWwiOiJqYmVsbGFzc2FpQGlkZW50aXR5YXV0b21hdGlvbi5jb20iLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiYXRfaGFzaCI6IkFNWW5VRW1OajRlV0xGSmJ5b2RLbnc9PSJ9.CQHKhnjqqA6yF6-HoWVhyZANLDlSFz1hg8kPuQVfX_jitP5xDoh-uBp5Luuy1FxcGdsNph8l47vA4GGSziCm5IeoECtAyfCdsF9H08muZw6oal3XioPrrYT7neh-WFsiPwPQNf3R6N7zuY-KavlTOy6xZQF3hiyWU-TQQWXJ8FpOA8fnEKaqmDgcQHhxH4cxGtqcuIx74jks_F7KJz4aHVbh7O0Fav1g0qHxyT63ye22jSm0XuAZzNuRgr6Zs0I37fMOxMXt6jgU0-PoN5oMo6pwehP5ymTKzpZlhCqKiSRVlPKBAlb_hL_mNboITkyeFK7mO4PtCa7JN6U2syxnBA', 'token_type': 'Bearer'}
3.648AccessTokenResponse
{
    "access_token": "M~g~0-jfmJ+Mwg5A3AnKI3R-hOYU67e/HXAQ_unhdQiv~y5Os4",
    "expires_in": 32399,
    "id_token": {
        "at_hash": "AMYnUEmNj4eWLFJbyodKnw==",
        "aud": [
            "3000badf0c55d2cae7c22b3d63e3f667"
        ],
        "auth_time": 1513631215,
        "azp": "3000badf0c55d2cae7c22b3d63e3f667",
        "email": "jbellassai@identityautomation.com",
        "email_verified": true,
        "exp": 1513631350,
        "family_name": "Admin",
        "given_name": "System",
        "iat": 1513631290,
        "iss": "https://oidctest.idautoengineering.net/idp",
        "name": "System Admin",
        "nonce": "QbXde0GUX9Rt7fdm",
        "sub": "262027a0-af77-11e7-876d-02740c549cca"
    },
    "refresh_token": "+6~qGP//IKw+IO8Q_M.3wJWPI+l1hHyMG.MS4~k4.X-l1c_.cN",
    "scope": "openid",
    "token_type": "Bearer"
}
3.648phase<--<-- 6 --- TimeDelay -->-->
33.678phase<--<-- 7 --- AccessToken -->-->
33.678requestop_args: {'state': 'IHxyHNse2KNYtM5D'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:60992/authz_cb'}
33.678do_access_token_request
kwargs:{'request_args': {'code': 'koFsvBbJbm.-pPsWJZBvQygDuRGqZevVg9gxHWEQi.pIhGZfO8', 'state': 'IHxyHNse2KNYtM5D', 'grant_type': 'authorization_code', 'client_id': '3000badf0c55d2cae7c22b3d63e3f667', 'redirect_uri': 'https://op.certification.openid.net:60992/authz_cb'}, 'state': 'IHxyHNse2KNYtM5D'}
33.678AccessTokenRequest
{
    "client_id": "3000badf0c55d2cae7c22b3d63e3f667",
    "code": "koFsvBbJbm.-pPsWJZBvQygDuRGqZevVg9gxHWEQi.pIhGZfO8",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:60992/authz_cb",
    "state": "IHxyHNse2KNYtM5D"
}
33.678request_urlhttps://oidctest.idautoengineering.net/idp/profile/oidc/token
33.678request_http_args{'headers': {'Authorization': 'Basic MzAwMGJhZGYwYzU1ZDJjYWU3YzIyYjNkNjNlM2Y2Njc6ODY5N2E4OTlhYzFjNzYwODAyNmM4ZDEzN2E1YzMzYTAwM2RlMDA1MDc2MzBmMmQ2OGM5NTNlMTNkNzVlNjFiYg==', 'Content-Type': 'application/x-www-form-urlencoded'}}
33.678requestclient_id=3000badf0c55d2cae7c22b3d63e3f667&state=IHxyHNse2KNYtM5D&code=koFsvBbJbm.-pPsWJZBvQygDuRGqZevVg9gxHWEQi.pIhGZfO8&grant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A60992%2Fauthz_cb
33.712http response
url:https://oidctest.idautoengineering.net/idp/profile/oidc/token status_code:400 message:{
  "error" : "invalid_grant",
  "error_description" : "The authorization code is not valid"
}
33.712response{'error_description': 'The authorization code is not valid', 'error': 'invalid_grant'}
33.712eventGot expected error
33.712TokenErrorResponse
{
    "error": "invalid_grant",
    "error_description": "The authorization code is not valid"
}
33.712phase<--<-- 8 --- Done -->-->
33.712end
33.713assertionVerifyResponse
33.713conditionverify-response: status=OK [Checks that the last response was one of a possible set of OpenID Connect Responses]
33.713conditionDone: status=OK

Result

PASSED