Test Info

Issuerhttps://cloud-api.loginradius.com/sso/oidc/v2/internal-mayank/oidctest
Profile[]
Test IDOP-OAuth-2nd-Revokes
Test descriptionTrying to use authorization code twice should result in revoking previously issued access tokens
Timestamp2020-07-09T07:19:15Z

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 -->-->
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": [
        "middle_name",
        "LastName",
        "phone_number_verified",
        "name",
        "locale",
        "auth_time",
        "Uid",
        "Favicon",
        "website",
        "gender",
        "FirstName",
        "CustomFields.customerid",
        "birthdate",
        "acr",
        "profile",
        "email_verified",
        "phone_number",
        "updated_at",
        "email",
        "address",
        "preferred_username",
        "picture",
        "zoneinfo",
        "Country",
        "given_name",
        "nickname",
        "family_name",
        "UserName"
    ],
    "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 -->-->
3phase<--<-- 4 --- AsyncAuthn -->-->
3AuthorizationRequest
{
    "client_id": "112563f6-1480-40b8-8e28-e072ca212c82",
    "nonce": "xC4i5zwRV1WIU1Ep",
    "redirect_uri": "https://op.certification.openid.net:61949/authz_cb",
    "response_type": "code",
    "scope": "openid",
    "state": "U3yMAXip0rEtdaAp"
}
3redirect urlhttps://cloud-api.loginradius.com/sso/oidc/v2/oidctest/authorize?state=U3yMAXip0rEtdaAp&nonce=xC4i5zwRV1WIU1Ep&response_type=code&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61949%2Fauthz_cb&client_id=112563f6-1480-40b8-8e28-e072ca212c82
3redirecthttps://cloud-api.loginradius.com/sso/oidc/v2/oidctest/authorize?state=U3yMAXip0rEtdaAp&nonce=xC4i5zwRV1WIU1Ep&response_type=code&scope=openid&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61949%2Fauthz_cb&client_id=112563f6-1480-40b8-8e28-e072ca212c82
22responseResponse URL with query part
22response{'state': 'U3yMAXip0rEtdaAp', 'code': 'c6968573894577e667ad097a3e07cc10:917263d30a3f690a6f9ea75b77554e484907b59a960a7d304d3ffa5eda579fccc95c77be648803bb9e1ee55009cd45f0443417f0d2f8fbe7790d7f1adf368fcd32ead47bf3c24fb5cb11beec8aaff2da1028002ff6e2041f91f5d6540ee063e5917c4eb6efd205c904db60cd21cb403c'}
22response{'state': 'U3yMAXip0rEtdaAp', 'code': 'c6968573894577e667ad097a3e07cc10:917263d30a3f690a6f9ea75b77554e484907b59a960a7d304d3ffa5eda579fccc95c77be648803bb9e1ee55009cd45f0443417f0d2f8fbe7790d7f1adf368fcd32ead47bf3c24fb5cb11beec8aaff2da1028002ff6e2041f91f5d6540ee063e5917c4eb6efd205c904db60cd21cb403c'}
22AuthorizationResponse
{
    "code": "c6968573894577e667ad097a3e07cc10:917263d30a3f690a6f9ea75b77554e484907b59a960a7d304d3ffa5eda579fccc95c77be648803bb9e1ee55009cd45f0443417f0d2f8fbe7790d7f1adf368fcd32ead47bf3c24fb5cb11beec8aaff2da1028002ff6e2041f91f5d6540ee063e5917c4eb6efd205c904db60cd21cb403c",
    "state": "U3yMAXip0rEtdaAp"
}
22phase<--<-- 5 --- AccessToken -->-->
22requestop_args: {'state': 'U3yMAXip0rEtdaAp'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61949/authz_cb'}
22do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61949/authz_cb', 'code': 'c6968573894577e667ad097a3e07cc10:917263d30a3f690a6f9ea75b77554e484907b59a960a7d304d3ffa5eda579fccc95c77be648803bb9e1ee55009cd45f0443417f0d2f8fbe7790d7f1adf368fcd32ead47bf3c24fb5cb11beec8aaff2da1028002ff6e2041f91f5d6540ee063e5917c4eb6efd205c904db60cd21cb403c', 'state': 'U3yMAXip0rEtdaAp', 'grant_type': 'authorization_code', 'client_id': '112563f6-1480-40b8-8e28-e072ca212c82'}, 'state': 'U3yMAXip0rEtdaAp', 'authn_method': 'client_secret_basic'}
22AccessTokenRequest
{
    "code": "c6968573894577e667ad097a3e07cc10:917263d30a3f690a6f9ea75b77554e484907b59a960a7d304d3ffa5eda579fccc95c77be648803bb9e1ee55009cd45f0443417f0d2f8fbe7790d7f1adf368fcd32ead47bf3c24fb5cb11beec8aaff2da1028002ff6e2041f91f5d6540ee063e5917c4eb6efd205c904db60cd21cb403c",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61949/authz_cb",
    "state": "U3yMAXip0rEtdaAp"
}
22request_urlhttps://cloud-api.loginradius.com/sso/oidc/v2/oidctest/token
22request_http_args{'headers': {'Authorization': 'Basic MTEyNTYzZjYtMTQ4MC00MGI4LThlMjgtZTA3MmNhMjEyYzgyOjc4ZDNkYmUzLTEwZDEtNDk3Yi05MzU3LThlZWQ0NTkzMzYzZA==', 'Content-Type': 'application/x-www-form-urlencoded'}}
22requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61949%2Fauthz_cb&code=c6968573894577e667ad097a3e07cc10%3A917263d30a3f690a6f9ea75b77554e484907b59a960a7d304d3ffa5eda579fccc95c77be648803bb9e1ee55009cd45f0443417f0d2f8fbe7790d7f1adf368fcd32ead47bf3c24fb5cb11beec8aaff2da1028002ff6e2041f91f5d6540ee063e5917c4eb6efd205c904db60cd21cb403c&state=U3yMAXip0rEtdaAp
22http response
url:https://cloud-api.loginradius.com/sso/oidc/v2/oidctest/token status_code:200
22response{'access_token': '73edb50c-031e-472e-bbe0-f6800103252a', 'token_type': 'Bearer', 'refresh_token': '1b19c55e-8823-4fe8-aadc-a838f47df930', 'expires_in': 893, 'id_token': 'eyJhbGciOiJSUzI1NiIsImtpZCI6IjIwMSIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjp7ImNvdW50cnkiOm51bGwsImxvY2FsaXR5IjpudWxsLCJwb3N0YWxfY29kZSI6bnVsbCwicmVnaW9uIjpudWxsLCJzdHJlZXRfYWRkcmVzcyI6bnVsbH0sImFzZGZnaCI6IiIsImF1ZCI6IjExMjU2M2Y2LTE0ODAtNDBiOC04ZTI4LWUwNzJjYTIxMmM4MiIsImF1dGhfdGltZSI6MTU5NDI3OTE0OCwiYmlydGhkYXRlIjoiMTk4Ny0wNy0wOCIsImNfaGF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JzaXRlIjpudWxsLCJ6b25laW5mbyI6bnVsbH0.lk-YcwKWXsEh2LeQ1HXS1iA7lKGhv4FSJ8hEkSXvT1D5eQLp1B1htX_sEQVCYnzByCny17tlaZGDVDtoG8x7_tt1vuGL2SQI_YGfy0xL13dnzP9RLJ72_6toRVu4i75rfpuRfV5LQRlgNMDCm98U4mGOqgq59ZDnn09U2S7M3Nhbr-pLX5mT9DDTThOTsFfquGerIq52VCsubN9DhcOFEFZZsts6VEVMZK_HN-jYZxeYCAT6btg1bQMXqGPYynS8rES32mXzrRO0eakkkxCs_F19Dromrxsx9Bu0yUpzlMEv2ogGM5j-ttGqCt5MwWjGP1fWHs5pLRhVCI0XRSPW_g'}
22AccessTokenResponse
{
    "access_token": "73edb50c-031e-472e-bbe0-f6800103252a",
    "expires_in": 893,
    "id_token": {
        "address": {
            "country": null,
            "locality": null,
            "postal_code": null,
            "region": null,
            "street_address": null
        },
        "aud": [
            "112563f6-1480-40b8-8e28-e072ca212c82"
        ],
        "auth_time": 1594279148,
        "birthdate": "1987-07-08",
        "c_hash": "A4dNFGJLP5xyWmJtmXiqPQ",
        "country": null,
        "email": {
            "Type": "Primary",
            "Value": "cloudssotest@mailazy.com"
        },
        "email_verified": true,
        "exp": 1594279754,
        "family_name": "tesrt",
        "favicon1": null,
        "fname": "cloudssot",
        "gender": null,
        "given_name": "cloudssot",
        "iat": 1594279154,
        "iss": "https://cloud-api.loginradius.com/sso/oidc/v2/internal-mayank/oidctest",
        "jti": "59e6c06f-3e22-4f9f-8959-3d314d482471",
        "lname": "tesrt",
        "locale": null,
        "middle_name": null,
        "name": "cloudssot tesrt",
        "nbf": 1594279154,
        "nickname": null,
        "nonce": "xC4i5zwRV1WIU1Ep",
        "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": "1b19c55e-8823-4fe8-aadc-a838f47df930",
    "token_type": "Bearer"
}
22jws header{'alg': 'RS256', 'kid': '201', 'typ': 'JWT'}
22phase<--<-- 6 --- AccessToken -->-->
22requestop_args: {'state': 'U3yMAXip0rEtdaAp'}, req_args: {'redirect_uri': 'https://op.certification.openid.net:61949/authz_cb'}
22do_access_token_request
kwargs:{'request_args': {'redirect_uri': 'https://op.certification.openid.net:61949/authz_cb', 'code': 'c6968573894577e667ad097a3e07cc10:917263d30a3f690a6f9ea75b77554e484907b59a960a7d304d3ffa5eda579fccc95c77be648803bb9e1ee55009cd45f0443417f0d2f8fbe7790d7f1adf368fcd32ead47bf3c24fb5cb11beec8aaff2da1028002ff6e2041f91f5d6540ee063e5917c4eb6efd205c904db60cd21cb403c', 'state': 'U3yMAXip0rEtdaAp', 'grant_type': 'authorization_code', 'client_id': '112563f6-1480-40b8-8e28-e072ca212c82'}, 'state': 'U3yMAXip0rEtdaAp', 'authn_method': 'client_secret_basic'}
22AccessTokenRequest
{
    "code": "c6968573894577e667ad097a3e07cc10:917263d30a3f690a6f9ea75b77554e484907b59a960a7d304d3ffa5eda579fccc95c77be648803bb9e1ee55009cd45f0443417f0d2f8fbe7790d7f1adf368fcd32ead47bf3c24fb5cb11beec8aaff2da1028002ff6e2041f91f5d6540ee063e5917c4eb6efd205c904db60cd21cb403c",
    "grant_type": "authorization_code",
    "redirect_uri": "https://op.certification.openid.net:61949/authz_cb",
    "state": "U3yMAXip0rEtdaAp"
}
22request_urlhttps://cloud-api.loginradius.com/sso/oidc/v2/oidctest/token
22request_http_args{'headers': {'Authorization': 'Basic MTEyNTYzZjYtMTQ4MC00MGI4LThlMjgtZTA3MmNhMjEyYzgyOjc4ZDNkYmUzLTEwZDEtNDk3Yi05MzU3LThlZWQ0NTkzMzYzZA==', 'Content-Type': 'application/x-www-form-urlencoded'}}
22requestgrant_type=authorization_code&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61949%2Fauthz_cb&code=c6968573894577e667ad097a3e07cc10%3A917263d30a3f690a6f9ea75b77554e484907b59a960a7d304d3ffa5eda579fccc95c77be648803bb9e1ee55009cd45f0443417f0d2f8fbe7790d7f1adf368fcd32ead47bf3c24fb5cb11beec8aaff2da1028002ff6e2041f91f5d6540ee063e5917c4eb6efd205c904db60cd21cb403c&state=U3yMAXip0rEtdaAp
22http 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"}
22response{'error': 'invalid_grant', 'error_description': 'The code is already used'}
22eventGot expected error
22TokenErrorResponse
{
    "error": "invalid_grant",
    "error_description": "The code is already used"
}
22phase<--<-- 7 --- UserInfo -->-->
22do_user_info_request
kwargs:{'state': 'U3yMAXip0rEtdaAp', 'method': 'GET', 'authn_method': 'bearer_header'}
22request{'body': None}
22request_urlhttps://cloud-api.loginradius.com/sso/oidc/v2/internal-mayank/oidctest/userinfo
22request_http_args{'headers': {'Authorization': 'Bearer 73edb50c-031e-472e-bbe0-f6800103252a'}}
23http response
url:https://cloud-api.loginradius.com/sso/oidc/v2/internal-mayank/oidctest/userinfo status_code:400 message:{"error":"invalid_grant","error_description":"The access_token is invalid or expired"}
23eventExpected error not received: got invalid_grant
23ErrorResponse
{
    "error": "invalid_grant",
    "error_description": "The access_token is invalid or expired"
}
23ErrorResponse
{
    "error": "invalid_grant",
    "error_description": "The access_token is invalid or expired"
}
23phase<--<-- 8 --- Done -->-->
23end
23assertionVerifyResponse
23conditionverify-response: status=OK [Checks that the last response was one of a possible set of OpenID Connect Responses]
23conditionDone: status=OK

Result

PASSED