Test Info

Issuerhttps://cloud-api.loginradius.com/sso/oidc/v2/internal-mayank/oidctest
Profile[]
Test IDOP-OAuth-2nd
Test descriptionTrying to use authorization code twice should result in an error
Timestamp2020-07-09T09:35:43Z

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 --- Webfinger -->-->
0not expected to doWebFinger
0phase<--<-- 1 --- Discovery -->-->
0provider_config
kwargs:{'issuer': 'https://cloud-api.loginradius.com/sso/oidc/v2/internal-mayank/oidctest'}
0http response
url:https://cloud-api.loginradius.com/sso/oidc/v2/internal-mayank/oidctest/.well-known/openid-configuration status_code:200
0ProviderConfigurationResponse
{
    "acr_values_supported": [
        "loginradius:nist:level:1:re-auth"
    ],
    "authorization_endpoint": "https://cloud-api.loginradius.com/sso/oidc/v2/oidctest/authorize",
    "backchannel_logout_session_supported": false,
    "backchannel_logout_supported": false,
    "claims_parameter_supported": false,
    "claims_supported": [
        "gender",
        "locale",
        "auth_time",
        "Uid",
        "Favicon",
        "website",
        "acr",
        "FirstName",
        "CustomFields.customerid",
        "birthdate",
        "phone_number",
        "profile",
        "email_verified",
        "address",
        "updated_at",
        "email",
        "nickname",
        "preferred_username",
        "picture",
        "zoneinfo",
        "Country",
        "given_name",
        "UserName",
        "family_name",
        "middle_name",
        "name",
        "LastName",
        "phone_number_verified"
    ],
    "frontchannel_logout_session_supported": false,
    "frontchannel_logout_supported": false,
    "grant_types_supported": [
        "authorization_code",
        "refresh_token"
    ],
    "id_token_signing_alg_values_supported": [
        "RS256"
    ],
    "issuer": "https://cloud-api.loginradius.com/sso/oidc/v2/internal-mayank/oidctest",
    "jwks_uri": "https://cloud-api.loginradius.com/sso/oidc/v2/internal-mayank/oidctest/jwks",
    "request_parameter_supported": false,
    "request_uri_parameter_supported": true,
    "require_request_uri_registration": false,
    "response_modes_supported": [
        "query",
        "form_post",
        "fragment"
    ],
    "response_types_supported": [
        "code",
        "token",
        "id_token",
        "code token",
        "code id_token",
        "token id_token",
        "code token id_token"
    ],
    "revocation_endpoint": "https://cloud-api.loginradius.com/sso/oidc/v2/oidctest/revoke",
    "scopes_supported": [
        "openid",
        "email",
        "phone",
        "profile",
        "address"
    ],
    "subject_types_supported": [
        "public"
    ],
    "token_endpoint": "https://cloud-api.loginradius.com/sso/oidc/v2/oidctest/token",
    "token_endpoint_auth_methods_supported": [
        "client_secret_post",
        "client_secret_basic"
    ],
    "userinfo_endpoint": "https://cloud-api.loginradius.com/sso/oidc/v2/internal-mayank/oidctest/userinfo",
    "version": "3.0"
}
0phase<--<-- 2 --- Registration -->-->
0not expected to doDynamic registration
0phase<--<-- 3 --- Note -->-->
2phase<--<-- 4 --- AsyncAuthn -->-->
2AuthorizationRequest
{
    "client_id": "112563f6-1480-40b8-8e28-e072ca212c82",
    "nonce": "ajXllVwQSWihjAfN",
    "redirect_uri": "https://op.certification.openid.net:62346/authz_cb",
    "response_type": "code token",
    "scope": "openid",
    "state": "sP8W2FyCTis8NIUS"
}
2redirect urlhttps://cloud-api.loginradius.com/sso/oidc/v2/oidctest/authorize?state=sP8W2FyCTis8NIUS&nonce=ajXllVwQSWihjAfN&response_type=code+token&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A62346%2Fauthz_cb&client_id=112563f6-1480-40b8-8e28-e072ca212c82
2redirecthttps://cloud-api.loginradius.com/sso/oidc/v2/oidctest/authorize?state=sP8W2FyCTis8NIUS&nonce=ajXllVwQSWihjAfN&response_type=code+token&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A62346%2Fauthz_cb&client_id=112563f6-1480-40b8-8e28-e072ca212c82
13http args{}
14responseURL with fragment
14responsestate=sP8W2FyCTis8NIUS&code=768a2b4965f5b6a2d332f818c58d46f8%3Aa32aa7163a71cef3932e1dc1827f81ca33fbd3008a83208bec60a021e3dc32bcd65e3770c414378dddff32a6437a96e7a03808529e980cb3e82cca48d94c242aece9762f41d39d73d76a718be9b85ecf6d286964c8b8755c085955934d8802fb6aac213fc5492c57cd93a453b578f1be&access_token=0b449c5f-33b1-4e46-a368-f2ff8f2eeff8&token_type=Bearer&expires_in=895
14response{'state': 'sP8W2FyCTis8NIUS', 'code': '768a2b4965f5b6a2d332f818c58d46f8:a32aa7163a71cef3932e1dc1827f81ca33fbd3008a83208bec60a021e3dc32bcd65e3770c414378dddff32a6437a96e7a03808529e980cb3e82cca48d94c242aece9762f41d39d73d76a718be9b85ecf6d286964c8b8755c085955934d8802fb6aac213fc5492c57cd93a453b578f1be', 'access_token': '0b449c5f-33b1-4e46-a368-f2ff8f2eeff8', 'token_type': 'Bearer', 'expires_in': 895}
14AuthorizationResponse
{
    "access_token": "0b449c5f-33b1-4e46-a368-f2ff8f2eeff8",
    "code": "768a2b4965f5b6a2d332f818c58d46f8:a32aa7163a71cef3932e1dc1827f81ca33fbd3008a83208bec60a021e3dc32bcd65e3770c414378dddff32a6437a96e7a03808529e980cb3e82cca48d94c242aece9762f41d39d73d76a718be9b85ecf6d286964c8b8755c085955934d8802fb6aac213fc5492c57cd93a453b578f1be",
    "expires_in": 895,
    "state": "sP8W2FyCTis8NIUS",
    "token_type": "Bearer"
}
14phase<--<-- 5 --- AccessToken -->-->
14requestop_args: {'state': 'sP8W2FyCTis8NIUS'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:62346/authz_cb'}
14do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:62346/authz_cb', 'code': '768a2b4965f5b6a2d332f818c58d46f8:a32aa7163a71cef3932e1dc1827f81ca33fbd3008a83208bec60a021e3dc32bcd65e3770c414378dddff32a6437a96e7a03808529e980cb3e82cca48d94c242aece9762f41d39d73d76a718be9b85ecf6d286964c8b8755c085955934d8802fb6aac213fc5492c57cd93a453b578f1be', 'state': 'sP8W2FyCTis8NIUS', 'grant_type': 'authorization_code', 'client_id': '112563f6-1480-40b8-8e28-e072ca212c82'}, 'state': 'sP8W2FyCTis8NIUS', 'authn_method': 'client_secret_basic'}
14AccessTokenRequest
{
    "code": "768a2b4965f5b6a2d332f818c58d46f8:a32aa7163a71cef3932e1dc1827f81ca33fbd3008a83208bec60a021e3dc32bcd65e3770c414378dddff32a6437a96e7a03808529e980cb3e82cca48d94c242aece9762f41d39d73d76a718be9b85ecf6d286964c8b8755c085955934d8802fb6aac213fc5492c57cd93a453b578f1be",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:62346/authz_cb",
    "state": "sP8W2FyCTis8NIUS"
}
14request_urlhttps://cloud-api.loginradius.com/sso/oidc/v2/oidctest/token
14request_http_args{'headers': {'Authorization': 'Basic MTEyNTYzZjYtMTQ4MC00MGI4LThlMjgtZTA3MmNhMjEyYzgyOjc4ZDNkYmUzLTEwZDEtNDk3Yi05MzU3LThlZWQ0NTkzMzYzZA==', 'Content-Type': 'application/x-www-form-urlencoded'}}
14requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A62346%2Fauthz_cb&code=768a2b4965f5b6a2d332f818c58d46f8%3Aa32aa7163a71cef3932e1dc1827f81ca33fbd3008a83208bec60a021e3dc32bcd65e3770c414378dddff32a6437a96e7a03808529e980cb3e82cca48d94c242aece9762f41d39d73d76a718be9b85ecf6d286964c8b8755c085955934d8802fb6aac213fc5492c57cd93a453b578f1be&state=sP8W2FyCTis8NIUS
14http response
url:https://cloud-api.loginradius.com/sso/oidc/v2/oidctest/token status_code:200
14response{'access_token': '0b449c5f-33b1-4e46-a368-f2ff8f2eeff8', 'token_type': 'Bearer', 'refresh_token': 'af41c704-e8ac-4014-bde9-63721dd4cbfc', 'expires_in': 893, 'id_token': 'eyJhbGciOiJSUzI1NiIsImtpZCI6IjIwMSIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjp7ImNvdW50cnkiOm51bGwsImxvY2FsaXR5IjpudWxsLCJwb3N0YWxfY29kZSI6bnVsbCwicmVnaW9uI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GVzdCIsInByb2ZpbGUiOm51bGwsInN1YiI6IjBiN2Y5NDViOGM1ZjRhMzZhMzViZjQ5ZjcyMzliZmE0IiwidWlkIjoiMGI3Zjk0NWI4YzVmNGEzNmEzNWJmNDlmNzIzOWJmYTQiLCJ1cGRhdGVkX2F0IjoxNTYzODg1MTA5LCJ1c2VybmFtZSI6ImNsb3Vkc3NvdGVzdCIsIndlYnNpdGUiOm51bGwsInpvbmVpbmZvIjpudWxsfQ.NSkJmTyjwNSEQOsLqGd5OOSURucg2MIZ23k-UA9p_SYhLVcMwbl2Y7ji75LaT7STq_Cf8LvWdKaat2YiNpcyHjHVeoxEzprDg4BPQxeM-SDpfbE9JUjlOY9SqBMm8iZ0-wzAgzkyNr7e9bmBH9rSoqh5rYs3jvU5K5NAzVJW7NOAl4sdSyB7gq0DmgPNlUIvXlZmWUzqY6ZWyQikGsNIrQ9A2J8OZdcJGnHfgoVl1bv_hpE59Xk-LEOF2Vs0xyfsJX_4yAVQd8iE_kRl3idsSssalR3G5czmxS9saG4mS6P2e8cpGyuI7ZgKMvbHE60coaRVmfvbOngFXnjWqPq7sQ'}
14AccessTokenResponse
{
    "access_token": "0b449c5f-33b1-4e46-a368-f2ff8f2eeff8",
    "expires_in": 893,
    "id_token": {
        "address": {
            "country": null,
            "locality": null,
            "postal_code": null,
            "region": null,
            "street_address": null
        },
        "at_hash": "yUHQ0J8ZRkzQd8I1MS9uXg",
        "aud": [
            "112563f6-1480-40b8-8e28-e072ca212c82"
        ],
        "auth_time": 1594287337,
        "birthdate": "1987-07-08",
        "c_hash": "1bziuPAUXxCM1kpfgfFLlw",
        "country": null,
        "email": {
            "Type": "Primary",
            "Value": "cloudssotest@mailazy.com"
        },
        "email_verified": true,
        "exp": 1594287943,
        "family_name": "tesrt",
        "favicon1": null,
        "fname": "cloudssot",
        "gender": null,
        "given_name": "cloudssot",
        "iat": 1594287343,
        "iss": "https://cloud-api.loginradius.com/sso/oidc/v2/internal-mayank/oidctest",
        "jti": "3fa3112d-3bd3-4079-bf4c-19debf656ed9",
        "lname": "tesrt",
        "locale": null,
        "middle_name": null,
        "name": "cloudssot tesrt",
        "nbf": 1594287343,
        "nickname": null,
        "nonce": "ajXllVwQSWihjAfN",
        "phone_number": "+19029095714",
        "phone_number_verified": true,
        "picture": null,
        "preferred_username": "cloudssotest",
        "profile": null,
        "sub": "0b7f945b8c5f4a36a35bf49f7239bfa4",
        "uid": "0b7f945b8c5f4a36a35bf49f7239bfa4",
        "updated_at": 1563885109,
        "username": "cloudssotest",
        "website": null,
        "zoneinfo": null
    },
    "refresh_token": "af41c704-e8ac-4014-bde9-63721dd4cbfc",
    "token_type": "Bearer"
}
14jws header{'alg': 'RS256', 'kid': '201', 'typ': 'JWT'}
14phase<--<-- 6 --- AccessToken -->-->
14requestop_args: {'state': 'sP8W2FyCTis8NIUS'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:62346/authz_cb'}
14do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:62346/authz_cb', 'code': '768a2b4965f5b6a2d332f818c58d46f8:a32aa7163a71cef3932e1dc1827f81ca33fbd3008a83208bec60a021e3dc32bcd65e3770c414378dddff32a6437a96e7a03808529e980cb3e82cca48d94c242aece9762f41d39d73d76a718be9b85ecf6d286964c8b8755c085955934d8802fb6aac213fc5492c57cd93a453b578f1be', 'state': 'sP8W2FyCTis8NIUS', 'grant_type': 'authorization_code', 'client_id': '112563f6-1480-40b8-8e28-e072ca212c82'}, 'state': 'sP8W2FyCTis8NIUS', 'authn_method': 'client_secret_basic'}
14AccessTokenRequest
{
    "code": "768a2b4965f5b6a2d332f818c58d46f8:a32aa7163a71cef3932e1dc1827f81ca33fbd3008a83208bec60a021e3dc32bcd65e3770c414378dddff32a6437a96e7a03808529e980cb3e82cca48d94c242aece9762f41d39d73d76a718be9b85ecf6d286964c8b8755c085955934d8802fb6aac213fc5492c57cd93a453b578f1be",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:62346/authz_cb",
    "state": "sP8W2FyCTis8NIUS"
}
14request_urlhttps://cloud-api.loginradius.com/sso/oidc/v2/oidctest/token
14request_http_args{'headers': {'Authorization': 'Basic MTEyNTYzZjYtMTQ4MC00MGI4LThlMjgtZTA3MmNhMjEyYzgyOjc4ZDNkYmUzLTEwZDEtNDk3Yi05MzU3LThlZWQ0NTkzMzYzZA==', 'Content-Type': 'application/x-www-form-urlencoded'}}
14requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A62346%2Fauthz_cb&code=768a2b4965f5b6a2d332f818c58d46f8%3Aa32aa7163a71cef3932e1dc1827f81ca33fbd3008a83208bec60a021e3dc32bcd65e3770c414378dddff32a6437a96e7a03808529e980cb3e82cca48d94c242aece9762f41d39d73d76a718be9b85ecf6d286964c8b8755c085955934d8802fb6aac213fc5492c57cd93a453b578f1be&state=sP8W2FyCTis8NIUS
14http response
url:https://cloud-api.loginradius.com/sso/oidc/v2/oidctest/token status_code:400 message:{"error":"invalid_grant","error_description":"The code is already used"}
14response{'error': 'invalid_grant', 'error_description': 'The code is already used'}
14eventGot expected error
14TokenErrorResponse
{
    "error": "invalid_grant",
    "error_description": "The code is already used"
}
14phase<--<-- 7 --- Done -->-->
14end
14assertionCheckHTTPErrorResponse
14conditioncheck-http-error-response: status=OK [Checks that an error code is either 400 or 401 which are the only ones accepted by OAuth2/OIDC.]
14assertionVerifyResponse
14conditionverify-response: status=OK [Checks that the last response was one of a possible set of OpenID Connect Responses]
14conditionDone: status=OK

Result

PASSED