You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Apigee will redirect to Okta to generate an authorization code. Log in using the Okta credentials for the user created earlier.
188
188
189
189

190
190
191
-
3. After successful authentication, Okta redirects to the Apigee callback URL (/v1/oauth20/callback), which controls the incoming query parameters, generate an authorization code (using the same value as the one provided by Okta) and performs a redirection on the client app redirect_uri `https://httpbin.org/get` providing the authorization_code and initial state parameters.
191
+
3. After successful authentication, Okta redirects to the Apigee callback URL (/v1/oauth20/callback), which controls the incoming query parameters, generate an authorization code (using the same value as the one provided by Okta) and performs a redirection on the client app redirect_uri `https://mocktarget.apigee.net/echo` providing the authorization_code and initial state parameters.
192
192
193
193
- In a real-world scenario, the redirection would be back to the client application and it would parse Okta's response to capture the authorization code
194
194
@@ -201,7 +201,7 @@ This test will simulate a three-legged [OAuth 2.0](https://cloud.google.com/apig
201
201
export APIGEE_RESPONSE=$(curl -s --location --request POST "https://$APIGEE_X_HOSTNAME/v1/oauth20/token?client_id=$APIGEE_CLIENT_ID" \
Copy file name to clipboardexpand all lines: references/identity-facade/test/integration/features/identity-facade.authorize-pkce.feature
+6-6
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,24 @@
1
1
@pkce@authorize
2
2
Feature:
3
-
As a Client App
3
+
As a Client App
4
4
I want to access the protected resource of an API
5
5
So that I can retrieve different types of information
6
6
7
7
Scenario: I should get an error if client_id is missing or invalid
8
-
When I GET /authorize?client_id=xxx&redirect_uri=https://httpbin.org/get&response_type=code&state=12345&scope=openid%20email`pkceCodeVerifier`
8
+
When I GET /authorize?client_id=xxx&redirect_uri=https://mocktarget.apigee.net/echo&response_type=code&state=12345&scope=openid%20email`pkceCodeVerifier`
9
9
Then response code should be 401
10
10
And response body should be valid json
11
11
12
12
Scenario: I should get an error if client_id contains heading or trailing spaces
13
-
When I GET /authorize?client_id=`spaceCharacters``clientId`&redirect_uri=https://httpbin.org/get&response_type=code&state=12345&scope=openid%20email`pkceCodeVerifier`
13
+
When I GET /authorize?client_id=`spaceCharacters``clientId`&redirect_uri=https://mocktarget.apigee.net/echo&response_type=code&state=12345&scope=openid%20email`pkceCodeVerifier`
14
14
Then response code should be 401
15
15
And response body should be valid json
16
-
16
+
17
17
Scenario: I should get an error if redirect_uri is missing or invalid
18
18
When I GET /authorize?client_id=`clientId`&redirect_uri=https://example.com/invalid&response_type=code&state=12345&scope=openid%20email`pkceCodeVerifier`
19
19
Then response code should be 400
20
20
And response body path $.error should be invalid_request
21
-
21
+
22
22
Scenario: I should get an error if response_type is missing or invalid
23
23
Given I navigate to the authorize page with an invalid response type
24
24
Then I am redirected to the Client App
@@ -28,7 +28,7 @@ Feature:
28
28
Given I navigate to the authorize page without a scope parameter
29
29
Then I am redirected to the Client App
30
30
Then I receive an invalid_request error
31
-
31
+
32
32
Scenario: User Authorizes with state missing
33
33
Given I navigate to the authorize page without a state parameter
Copy file name to clipboardexpand all lines: references/identity-facade/test/integration/features/identity-facade.authorize.feature
+7-7
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,24 @@
1
1
@authorize
2
2
Feature:
3
-
As a Client App
3
+
As a Client App
4
4
I want to access the protected resource of an API
5
5
So that I can retrieve different types of information
6
6
7
7
Scenario: I should get an error if client_id is missing or invalid
8
-
When I GET /authorize?client_id=xxx&redirect_uri=https://httpbin.org/get&response_type=code&state=12345&scope=openid%20email
8
+
When I GET /authorize?client_id=xxx&redirect_uri=https://mocktarget.apigee.net/echo&response_type=code&state=12345&scope=openid%20email
9
9
Then response code should be 401
10
10
And response body should be valid json
11
11
12
12
Scenario: I should get an error if client_id contains heading or trailing spaces
13
-
When I GET /authorize?client_id=`spaceCharacters``clientId`&redirect_uri=https://httpbin.org/get&response_type=code&state=12345&scope=openid%20email
13
+
When I GET /authorize?client_id=`spaceCharacters``clientId`&redirect_uri=https://mocktarget.apigee.net/echo&response_type=code&state=12345&scope=openid%20email
14
14
Then response code should be 401
15
15
And response body should be valid json
16
-
16
+
17
17
Scenario: I should get an error if redirect_uri is missing or invalid
18
18
When I GET /authorize?client_id=`clientId`&redirect_uri=https://example.com/invalid&response_type=code&state=12345&scope=openid%20email
19
19
Then response code should be 400
20
20
And response body path $.error should be invalid_request
21
-
21
+
22
22
Scenario: I should get an error if response_type is missing or invalid
23
23
Given I navigate to the authorize page with an invalid response type
24
24
Then I am redirected to the Client App
@@ -28,14 +28,14 @@ Feature:
28
28
Given I navigate to the authorize page without a scope parameter
29
29
Then I am redirected to the Client App
30
30
Then I receive an invalid_request error
31
-
31
+
32
32
Scenario: User Authorizes with state missing
33
33
Given I navigate to the authorize page without a state parameter
0 commit comments