Forked from srinivasanagandla-okta/gist:156bc8b8ceac624b6897
Last active
November 16, 2022 22:21
-
-
Save karlmcguinness-okta/b53c60f5847b0e35cdfb to your computer and use it in GitHub Desktop.
Revisions
-
karlmcguinness-okta revised this gist
May 1, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -169,7 +169,7 @@ POST https://your-domain.okta.com/api/v1/authn/factors POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate/sms { "stateToken": "00wlafXU2GV9I3tNvDNkOA1thqM5gDwCOgHID_-Iej", "profile": { "phoneNumber": "+1-555-415-1337" } -
karlmcguinness-okta revised this gist
May 1, 2015 . 1 changed file with 10 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -170,6 +170,9 @@ POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/life { "stateToken": "00wlafXU2GV9I3tNvDNkOA1thqM5gDwCOgHID_-Iej" "profile": { "phoneNumber": "+1-555-415-1337" } } ``` @@ -856,6 +859,8 @@ POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/lifecycle/activate #### Response Activation Model (same as `_embedded` in factor) ```http HTTP/1.1 202 Accepted @@ -997,7 +1002,7 @@ POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify ```http HTTP/1.1 202 Accepted Location: https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/transactions/mst1eiHghhPxf0yhp0g3/verify { "expiresAt": "2015-04-01T15:57:32.000Z", @@ -1028,7 +1033,7 @@ Location: https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors #### Request: ```http GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/transactions/{transactionId}/verify ``` #### Response @@ -1063,7 +1068,7 @@ GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId} #### Request: ```http GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/transactions/{transactionId}/verify ``` #### Response @@ -1079,7 +1084,7 @@ GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId} #### Request ```http GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/transactions/{transactionId}/verify ``` #### Response @@ -1114,7 +1119,7 @@ GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId} #### Request ```http GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/transactions/{transactionId}/verify ``` #### Response -
karlmcguinness-okta revised this gist
Apr 30, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1000,6 +1000,7 @@ HTTP/1.1 202 Accepted Location: https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g3 { "expiresAt": "2015-04-01T15:57:32.000Z", "factorResult": "WAITING", "_links": { "poll": { @@ -1034,6 +1035,7 @@ GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId} ```json { "expiresAt": "2015-04-01T15:57:32.000Z", "factorResult": "WAITING", "_links": { "poll": { -
karlmcguinness-okta revised this gist
Apr 30, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -659,7 +659,7 @@ HTTP/1.1 202 Accepted "expiresAt": "2014-11-02T23:44:41.736Z", "status": "MFA_CHALLENGE", "relayState": "/myapp/some/deep/link/i/want/to/return/to", "factorResult": "WAITING", "_embedded": { "user": { "id": "00ub0oNGTSWTBKOLGLNR", @@ -981,6 +981,7 @@ HTTP/1.1 200 OK } } } ``` ## Verify -
karlmcguinness-okta revised this gist
Apr 30, 2015 . 1 changed file with 9 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -81,6 +81,7 @@ POST https://your-domain.okta.com/api/v1/authn/factors "expiresAt": "2014-11-03T00:46:09.700Z", "status": "MFA_ENROLL_ACTIVATE", "relayState": "/myapp/some/deep/link/i/want/to/return/to", "factorResult": "WAITING", "_embedded": { "user": { "id": "00ub0oNGTSWTBKOLGLNR", @@ -178,6 +179,7 @@ POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/life "expiresAt": "2014-11-03T00:46:09.700Z", "status": "MFA_ENROLL_ACTIVATE", "relayState": "/myapp/some/deep/link/i/want/to/return/to", "factorResult": "WAITING", "_embedded": { "user": { "id": "00ub0oNGTSWTBKOLGLNR", @@ -260,7 +262,7 @@ POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/life ``` ## Poll for Device Activation ```http POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate @@ -360,7 +362,7 @@ HTTP/1.1 202 Accepted } ``` ## Poll for Device Activation ```http POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate @@ -460,7 +462,7 @@ HTTP/1.1 202 Accepted } ``` ## Poll for Device Activation Complete ```http POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate @@ -493,9 +495,11 @@ HTTP/1.1 200 OK } ``` ## Poll for Device Activation Timeout When activation expires, the `next` link relation reverts to activate. > Note: Embedded activation object is intentionally missing during timout ```http POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate -
karlmcguinness-okta revised this gist
Apr 30, 2015 . 1 changed file with 418 additions and 74 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -101,12 +101,129 @@ POST https://your-domain.okta.com/api/v1/authn/factors }, "_embedded": { "activation": { "expiresAt": "2015-04-01T15:57:32.000Z", "_links": { "qrcode": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/qr/00fukNElRS_Tz6k-CFhg3pH4KO2dj2guhmaapXWbc4", "type": "image/png" }, "send": [ { "name": "email", "href": "https://your-domain.okta.com/api/v1/users/00u15s1KDETTQMQYABRL/factors/mbl1nz9JHJGHWRKMTLHP/lifecycle/activate/email", "hints": { "allow": [ "POST" ] } }, { "name": "sms", "href": "https://your-domain.okta.com/api/v1/users/00u15s1KDETTQMQYABRL/factors/mbl1nz9JHJGHWRKMTLHP/lifecycle/activate/sms", "hints": { "allow": [ "POST" ] } } ] } } } } }, "_links": { "next": { "name": "poll", "href": "https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate/poll", "hints": { "allow": [ "POST" ] } }, "cancel": { "href": "https://your-domain.okta.com/api/v1/authn/cancel", "hints": { "allow": [ "POST" ] } }, "prev": { "href": "https://your-domain.okta.com/api/v1/authn/previous", "hints": { "allow": [ "POST" ] } } } } ``` ## Send SMS Activation ```http POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate/sms { "stateToken": "00wlafXU2GV9I3tNvDNkOA1thqM5gDwCOgHID_-Iej" } ``` ```json { "stateToken": "00lT7DEzQaeP6mv1_y3pdXjNEONzk83mXX-yhgEdVQ", "expiresAt": "2014-11-03T00:46:09.700Z", "status": "MFA_ENROLL_ACTIVATE", "relayState": "/myapp/some/deep/link/i/want/to/return/to", "_embedded": { "user": { "id": "00ub0oNGTSWTBKOLGLNR", "profile": { "login": "isaac@example.org", "firstName": "Isaac", "lastName": "Brock", "locale": "en_US", "timeZone": "America/Los_Angeles" } }, "factor": { "id": "opfh52xcuft3J4uZc0g3", "factorType": "push", "provider": "OKTA", "profile": { }, "_embedded": { "activation": { "expiresAt": "2015-04-01T15:57:32.000Z", "_links": { "qrcode": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/qr/00fukNElRS_Tz6k-CFhg3pH4KO2dj2guhmaapXWbc4", "type": "image/png" }, "send": [ { "name": "email", "href": "https://your-domain.okta.com/api/v1/users/00u15s1KDETTQMQYABRL/factors/mbl1nz9JHJGHWRKMTLHP/lifecycle/activate/email", "hints": { "allow": [ "POST" ] } }, { "name": "sms", "href": "https://your-domain.okta.com/api/v1/users/00u15s1KDETTQMQYABRL/factors/mbl1nz9JHJGHWRKMTLHP/lifecycle/activate/sms", "hints": { "allow": [ "POST" ] } } ] } } } @@ -131,7 +248,7 @@ POST https://your-domain.okta.com/api/v1/authn/factors } }, "prev": { "href": "https://your-domain.okta.com/api/v1/authn/previous", "hints": { "allow": [ "POST" @@ -142,6 +259,7 @@ POST https://your-domain.okta.com/api/v1/authn/factors } ``` ## Activate Factor ```http @@ -181,12 +299,32 @@ HTTP/1.1 202 Accepted }, "_embedded": { "activation": { "expiresAt": "2015-04-01T15:57:32.000Z", "_links": { "qrcode": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/qr/00fukNElRS_Tz6k-CFhg3pH4KO2dj2guhmaapXWbc4", "type": "image/png" }, "send": [ { "name": "email", "href": "https://your-domain.okta.com/api/v1/users/00u15s1KDETTQMQYABRL/factors/mbl1nz9JHJGHWRKMTLHP/lifecycle/activate/email", "hints": { "allow": [ "POST" ] } }, { "name": "sms", "href": "https://your-domain.okta.com/api/v1/users/00u15s1KDETTQMQYABRL/factors/mbl1nz9JHJGHWRKMTLHP/lifecycle/activate/sms", "hints": { "allow": [ "POST" ] } } ] } } } @@ -211,7 +349,7 @@ HTTP/1.1 202 Accepted } }, "prev": { "href": "https://your-domain.okta.com/api/v1/authn/previous", "hints": { "allow": [ "POST" @@ -232,7 +370,7 @@ POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/life } ``` ```http HTTP/1.1 202 Accepted { @@ -261,12 +399,32 @@ HTTP/1.1 202 Accepted }, "_embedded": { "activation": { "expiresAt": "2015-04-01T15:57:32.000Z", "_links": { "qrcode": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/qr/00fukNElRS_Tz6k-CFhg3pH4KO2dj2guhmaapXWbc4", "type": "image/png" }, "send": [ { "name": "email", "href": "https://your-domain.okta.com/api/v1/users/00u15s1KDETTQMQYABRL/factors/mbl1nz9JHJGHWRKMTLHP/lifecycle/activate/email", "hints": { "allow": [ "POST" ] } }, { "name": "sms", "href": "https://your-domain.okta.com/api/v1/users/00u15s1KDETTQMQYABRL/factors/mbl1nz9JHJGHWRKMTLHP/lifecycle/activate/sms", "hints": { "allow": [ "POST" ] } } ] } } } @@ -291,7 +449,7 @@ HTTP/1.1 202 Accepted } }, "prev": { "href": "https://your-domain.okta.com/api/v1/authn/previous", "hints": { "allow": [ "POST" @@ -312,7 +470,7 @@ POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/life } ``` ```http HTTP/1.1 200 OK { @@ -335,6 +493,77 @@ HTTP/1.1 200 OK } ``` ## Activation Expired When activation expires, the `next` link relation reverts to activate ```http POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate { "stateToken": "00wlafXU2GV9I3tNvDNkOA1thqM5gDwCOgHID_-Iej" } ``` ```http HTTP/1.1 200 OK { "stateToken": "00lT7DEzQaeP6mv1_y3pdXjNEONzk83mXX-yhgEdVQ", "expiresAt": "2014-11-03T00:46:09.700Z", "status": "MFA_ENROLL_ACTIVATE", "relayState": "/myapp/some/deep/link/i/want/to/return/to", "factorResult": "TIMEOUT", "_embedded": { "user": { "id": "00ub0oNGTSWTBKOLGLNR", "profile": { "login": "isaac@example.org", "firstName": "Isaac", "lastName": "Brock", "locale": "en_US", "timeZone": "America/Los_Angeles" } }, "factor": { "id": "opfh52xcuft3J4uZc0g3", "factorType": "push", "provider": "OKTA", "profile": { } } }, "_links": { "next": { "name": "activate", "href": "https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate", "hints": { "allow": [ "POST" ] } }, "cancel": { "href": "https://your-domain.okta.com/api/v1/authn/cancel", "hints": { "allow": [ "POST" ] } }, "prev": { "href": "https://your-domain.okta.com/api/v1/authn/previous", "hints": { "allow": [ "POST" ] } } } } ``` # Verify via Auth API ## Primary Authentication @@ -353,7 +582,8 @@ POST https://your-domain.okta.com/api/v1/authn } } ``` ```json { "stateToken": "00Z20ZhXVrmyR3z8R-m77BvknHyckWCy5vNwEA6huD", "expiresAt": "2014-11-02T23:44:41.736Z", @@ -499,7 +729,7 @@ POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/veri } ``` ```http HTTP/1.1 200 OK { @@ -522,20 +752,24 @@ HTTP/1.1 200 OK } ``` # Factor API ## Enroll ### Enroll Factor #### Request ```http POST {{url}}/api/v1/users/{{userId}}/factors { "factorType": "push", "provider": "OKTA" } ``` #### Response ```json { @@ -549,51 +783,131 @@ HTTP/1.1 200 OK }, "_links": { "poll": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate", "hints": { "allow": [ "POST" ] } }, "self": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3", "hints": { "allow": [ "GET" ] } }, "user": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3", "hints": { "allow": [ "GET" ] } } }, "_embedded": { "activation": { "expiresAt": "2015-04-01T15:57:32.000Z", "_links": { "qrcode": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/qr/00fukNElRS_Tz6k-CFhg3pH4KO2dj2guhmaapXWbc4", "type": "image/png" }, "send": [ { "name": "email", "href": "https://your-domain.okta.com/api/v1/users/00u15s1KDETTQMQYABRL/factors/mbl1nz9JHJGHWRKMTLHP/lifecycle/activate/email", "hints": { "allow": [ "POST" ] } }, { "name": "sms", "href": "https://your-domain.okta.com/api/v1/users/00u15s1KDETTQMQYABRL/factors/mbl1nz9JHJGHWRKMTLHP/lifecycle/activate/sms", "hints": { "allow": [ "POST" ] } } ] } } } } ``` ### Poll for Device Activation to Complete #### Request ```http POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/lifecycle/activate ``` #### Response ```http HTTP/1.1 202 Accepted { "expiresAt": "2015-04-01T15:57:32.000Z", "factorResult": "WAITING", "_links": { "poll": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate", "hints": { "allow": [ "POST" ] } }, "qrcode": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/qr/00fukNElRS_Tz6k-CFhg3pH4KO2dj2guhmaapXWbc4", "type": "image/png" }, "send": [ { "name": "email", "href": "https://your-domain.okta.com/api/v1/users/00u15s1KDETTQMQYABRL/factors/mbl1nz9JHJGHWRKMTLHP/lifecycle/activate/email", "hints": { "allow": [ "POST" ] } }, { "name": "sms", "href": "https://your-domain.okta.com/api/v1/users/00u15s1KDETTQMQYABRL/factors/mbl1nz9JHJGHWRKMTLHP/lifecycle/activate/sms", "hints": { "allow": [ "POST" ] } } ] } } ``` ### Activation Complete #### Request ```http POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/lifecycle/activate ``` #### Response ```http HTTP/1.1 200 OK { "id": "opfh52xcuft3J4uZc0g3", "factorType": "push", @@ -609,7 +923,7 @@ HTTP/1.1 200 OK }, "_links": { "self": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3", "hints": { "allow": [ "GET", @@ -618,61 +932,81 @@ HTTP/1.1 200 OK } }, "verify": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify", "hints": { "allow": [ "POST" ] } }, "user": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3", "hints": { "allow": [ "GET" ] } } } } ``` ### Activation Timeout #### Request ```http POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/lifecycle/activate ``` #### Response: ```http HTTP/1.1 200 OK { "factorResult": "TIMEOUT", "_links": { "activate": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate", "hints": { "allow": [ "POST" ] } } } } ## Verify ### Start Verify Transaction #### Request ```http POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify ``` #### Response ```http HTTP/1.1 202 Accepted Location: https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g3 { "factorResult": "WAITING", "_links": { "poll": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g", "hints": { "allow": [ "GET" ] } }, "cancel": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g", "hints": { "allow": [ "DELETE" @@ -683,27 +1017,30 @@ Location: https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opf } ``` ### Poll Verify Transaction #### Request: ```http GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}} ``` #### Response ```json { "factorResult": "WAITING", "_links": { "poll": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g", "hints": { "allow": [ "GET" ] } }, "cancel": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g", "hints": { "allow": [ "DELETE" @@ -714,41 +1051,46 @@ Location: https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opf } ``` ### Verify Transaction Approved Poll Result #### Request: ```http GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}} ``` #### Response ```json { "factorResult": "SUCCESS" } ``` ### Verify Transaction Timout Poll Result #### Request ```http GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}} ``` #### Response ```json { "factorResult": "TIMEOUT", "_links": { "verify": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify", "hints": { "allow": [ "POST" ] } }, "factor": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3", "hints": { "allow": [ "GET", @@ -760,28 +1102,30 @@ Response: } ``` ### Verify Transaction Rejected Poll Result #### Request ```http GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}} ``` #### Response ```json { "factorResult": "REJECTED", "_links": { "verify": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify", "hints": { "allow": [ "POST" ] } }, "factor": { "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3", "hints": { "allow": [ "GET", -
karlmcguinness-okta revised this gist
Apr 6, 2015 . No changes.There are no files selected for viewing
-
karlmcguinness-okta revised this gist
Apr 4, 2015 . 1 changed file with 12 additions and 61 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,3 @@ # Enroll via Auth API ## Primary Authentication @@ -377,23 +376,10 @@ POST https://your-domain.okta.com/api/v1/authn "factorType": "push", "provider": "OKTA", "profile": { "platform": "IOS", "deviceType": "SMARTPHONE", "name": "karl iPhone", "version": "8.1" }, "_links": { "verify": { @@ -456,23 +442,10 @@ HTTP/1.1 202 Accepted "factorType": "push", "provider": "OKTA", "profile": { "platform": "IOS", "deviceType": "SMARTPHONE", "name": "karl iPhone", "version": "8.1" } } }, @@ -629,32 +602,10 @@ HTTP/1.1 200 OK "created": "2015-04-01T15:57:32.000Z", "lastUpdated": "2015-04-01T16:04:56.000Z", "profile": { "platform": "IOS", "deviceType": "SMARTPHONE", "name": "karl iPhone", "version": "8.1" }, "_links": { "self": { -
karlmcguinness-okta revised this gist
Apr 3, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -516,10 +516,10 @@ HTTP/1.1 202 Accepted } ``` ## Poll for Verification Complete ```http POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/verify { "stateToken": "00wlafXU2GV9I3tNvDNkOA1thqM5gDwCOgHID_-Iej" -
karlmcguinness-okta revised this gist
Apr 3, 2015 . 1 changed file with 223 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,10 @@ # Enroll via Auth API ## Primary Authentication ```http POST https://your-domain.okta.com/api/v1/authn { "username": "isaac@example.org", @@ -68,7 +67,7 @@ POST {{url}}/api/v1/authn ## Enroll Factor ```http POST https://your-domain.okta.com/api/v1/authn/factors { "stateToken": "00Z20ZhXVrmyR3z8R-m77BvknHyckWCy5vNwEA6huD", @@ -116,7 +115,7 @@ POST {{url}}/api/v1/authn/factors }, "_links": { "next": { "name": "poll", "href": "https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate", "hints": { "allow": [ @@ -155,6 +154,8 @@ POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/life ``` ``` HTTP/1.1 202 Accepted { "stateToken": "00lT7DEzQaeP6mv1_y3pdXjNEONzk83mXX-yhgEdVQ", "expiresAt": "2014-11-03T00:46:09.700Z", @@ -233,6 +234,8 @@ POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/life ``` ``` HTTP/1.1 202 Accepted { "stateToken": "00lT7DEzQaeP6mv1_y3pdXjNEONzk83mXX-yhgEdVQ", "expiresAt": "2014-11-03T00:46:09.700Z", @@ -272,7 +275,7 @@ POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/life }, "_links": { "next": { "name": "poll", "href": "https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate", "hints": { "allow": [ @@ -311,6 +314,8 @@ POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/life ``` ``` HTTP/1.1 200 OK { "expiresAt": "2014-11-03T10:15:57.000Z", "status": "SUCCESS", @@ -331,8 +336,220 @@ POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/life } ``` # Verify via Auth API ## Primary Authentication ```http POST https://your-domain.okta.com/api/v1/authn { "username": "isaac@example.org", "password": "GoAw@y123", "relayState": "/myapp/some/deep/link/i/want/to/return/to", "context": { "ipAddress": "192.168.12.11", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3)", "deviceToken": "26q43Ak9Eh04p7H6Nnx0m69JqYOrfVBY" } } ``` ``` { "stateToken": "00Z20ZhXVrmyR3z8R-m77BvknHyckWCy5vNwEA6huD", "expiresAt": "2014-11-02T23:44:41.736Z", "status": "MFA_REQUIRED", "relayState": "/myapp/some/deep/link/i/want/to/return/to", "_embedded": { "user": { "id": "00ub0oNGTSWTBKOLGLNR", "profile": { "login": "isaac@example.org", "firstName": "Isaac", "lastName": "Brock", "locale": "en_US", "timeZone": "America/Los_Angeles" } }, "factors": [ { "id": "opfh52xcuft3J4uZc0g3", "factorType": "push", "provider": "OKTA", "profile": { }, "_embedded": { "device": { "id": "mbdg6uYNMQTFLDUUICST", "status": "ACTIVE", "created": "2014-08-20T04:53:45.000Z", "lastUpdated": "2014-08-20T04:55:02.000Z", "profile": { "udid": "33ec98baeba682a74cf87b73e5526f87fc8c4734", "platform": "IOS", "deviceType": "SMARTPHONE", "name": "karl iPhone", "version": "8.1", "serial": "F4KLVLTAFCM8" } } }, "_links": { "verify": { "href": "https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/verify", "hints": { "allow": [ "POST" ] } } } } ] }, "_links": { "cancel": { "href": "https://your-domain.okta.com/api/v1/authn/cancel", "hints": { "allow": [ "POST" ] } } } } ``` ## Verify ```http POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/verify { "stateToken": "00wlafXU2GV9I3tNvDNkOA1thqM5gDwCOgHID_-Iej" } ``` ```http HTTP/1.1 202 Accepted { "stateToken": "00Z20ZhXVrmyR3z8R-m77BvknHyckWCy5vNwEA6huD", "expiresAt": "2014-11-02T23:44:41.736Z", "status": "MFA_CHALLENGE", "relayState": "/myapp/some/deep/link/i/want/to/return/to", "factorResult": "WAITING" "_embedded": { "user": { "id": "00ub0oNGTSWTBKOLGLNR", "profile": { "login": "isaac@example.org", "firstName": "Isaac", "lastName": "Brock", "locale": "en_US", "timeZone": "America/Los_Angeles" } }, "factors": { "id": "opfh52xcuft3J4uZc0g3", "factorType": "push", "provider": "OKTA", "profile": { }, "_embedded": { "device": { "id": "mbdg6uYNMQTFLDUUICST", "status": "ACTIVE", "created": "2014-08-20T04:53:45.000Z", "lastUpdated": "2014-08-20T04:55:02.000Z", "profile": { "udid": "33ec98baeba682a74cf87b73e5526f87fc8c4734", "platform": "IOS", "deviceType": "SMARTPHONE", "name": "karl iPhone", "version": "8.1", "serial": "F4KLVLTAFCM8" } } } } }, "_links": { "next": { "name": "poll", "href": "https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/verify", "hints": { "allow": [ "POST" ] } }, "cancel": { "href": "https://your-domain.okta.com/api/v1/authn/cancel", "hints": { "allow": [ "POST" ] } }, "prev": { "href": "https://your-domain.okta.com/api/v1/authn/previous", "hints": { "allow": [ "POST" ] } }, "resend": [ { "name": "push", "href": "https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/verify/resend", "hints": { "allow": [ "POST" ] } } ] } ``` ## Verify Complete ```http POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate { "stateToken": "00wlafXU2GV9I3tNvDNkOA1thqM5gDwCOgHID_-Iej" } ``` ``` HTTP/1.1 200 OK { "expiresAt": "2014-11-03T10:15:57.000Z", "status": "SUCCESS", "relayState": "/myapp/some/deep/link/i/want/to/return/to", "sessionToken": "00Fpzf4en68pCXTsMjcX8JPMctzN2Wiw4LDOBL_9pe", "_embedded": { "user": { "id": "00ub0oNGTSWTBKOLGLNR", "profile": { "login": "isaac@example.org", "firstName": "Isaac", "lastName": "Brock", "locale": "en_US", "timeZone": "America/Los_Angeles" } } } } ``` # Enroll Factor API: ## Request -
karlmcguinness-okta revised this gist
Apr 3, 2015 . 1 changed file with 334 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,337 @@ # Enroll via Auth API ## Primary Authentication ```http POST {{url}}/api/v1/authn { "username": "isaac@example.org", "password": "GoAw@y123", "relayState": "/myapp/some/deep/link/i/want/to/return/to", "context": { "ipAddress": "192.168.12.11", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3)", "deviceToken": "26q43Ak9Eh04p7H6Nnx0m69JqYOrfVBY" } } ``` ``` { "stateToken": "00Z20ZhXVrmyR3z8R-m77BvknHyckWCy5vNwEA6huD", "expiresAt": "2014-11-02T23:44:41.736Z", "status": "MFA_ENROLL", "relayState": "/myapp/some/deep/link/i/want/to/return/to", "_embedded": { "user": { "id": "00ub0oNGTSWTBKOLGLNR", "profile": { "login": "isaac@example.org", "firstName": "Isaac", "lastName": "Brock", "locale": "en_US", "timeZone": "America/Los_Angeles" } }, "factors": [ { "factorType": "push", "provider": "OKTA", "_links": { "enroll": { "href": "https://your-domain.okta.com/api/v1/authn/factors", "hints": { "allow": [ "POST" ] } } } } ] }, "_links": { "cancel": { "href": "https://your-domain.okta.com/api/v1/authn/cancel", "hints": { "allow": [ "POST" ] } } } } ``` ## Enroll Factor ```http POST {{url}}/api/v1/authn/factors { "stateToken": "00Z20ZhXVrmyR3z8R-m77BvknHyckWCy5vNwEA6huD", "factorType": "push", "provider": "OKTA" } ``` ```json { "stateToken": "00lT7DEzQaeP6mv1_y3pdXjNEONzk83mXX-yhgEdVQ", "expiresAt": "2014-11-03T00:46:09.700Z", "status": "MFA_ENROLL_ACTIVATE", "relayState": "/myapp/some/deep/link/i/want/to/return/to", "_embedded": { "user": { "id": "00ub0oNGTSWTBKOLGLNR", "profile": { "login": "isaac@example.org", "firstName": "Isaac", "lastName": "Brock", "locale": "en_US", "timeZone": "America/Los_Angeles" } }, "factor": { "id": "opfh52xcuft3J4uZc0g3", "factorType": "push", "provider": "OKTA", "profile": { }, "_embedded": { "activation": { "deviceActivationToken": "I17JQoOqbYOPH_lMWK5F", "_links": { "qrcode": { "href": "https://your-domain.okta.com/api/v1/users/00uoy3CXZHSMMJPHYXXP/factors/opfh52xcuft3J4uZc0g3/qr/00Mb0zqhJQohwCDkB2wOifajAsAosEAXvDwuCmsAZs", "type": "image/png" } } } } } }, "_links": { "next": { "name": "activate", "href": "https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate", "hints": { "allow": [ "POST" ] } }, "cancel": { "href": "https://your-domain.okta.com/api/v1/authn/cancel", "hints": { "allow": [ "POST" ] } }, "prev": { "href": "https://nag.okta1.com:80/api/v1/authn/previous", "hints": { "allow": [ "POST" ] } } } } ``` ## Activate Factor ```http POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate { "stateToken": "00wlafXU2GV9I3tNvDNkOA1thqM5gDwCOgHID_-Iej" } ``` ``` { "stateToken": "00lT7DEzQaeP6mv1_y3pdXjNEONzk83mXX-yhgEdVQ", "expiresAt": "2014-11-03T00:46:09.700Z", "status": "MFA_ENROLL_ACTIVATE", "relayState": "/myapp/some/deep/link/i/want/to/return/to", "factorResult": "WAITING", "_embedded": { "user": { "id": "00ub0oNGTSWTBKOLGLNR", "profile": { "login": "isaac@example.org", "firstName": "Isaac", "lastName": "Brock", "locale": "en_US", "timeZone": "America/Los_Angeles" } }, "factor": { "id": "opfh52xcuft3J4uZc0g3", "factorType": "push", "provider": "OKTA", "profile": { }, "_embedded": { "activation": { "deviceActivationToken": "I17JQoOqbYOPH_lMWK5F", "_links": { "qrcode": { "href": "https://your-domain.okta.com/api/v1/users/00uoy3CXZHSMMJPHYXXP/factors/opfh52xcuft3J4uZc0g3/qr/00Mb0zqhJQohwCDkB2wOifajAsAosEAXvDwuCmsAZs", "type": "image/png" } } } } } }, "_links": { "next": { "name": "poll", "href": "https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate", "hints": { "allow": [ "POST" ] } }, "cancel": { "href": "https://your-domain.okta.com/api/v1/authn/cancel", "hints": { "allow": [ "POST" ] } }, "prev": { "href": "https://nag.okta1.com:80/api/v1/authn/previous", "hints": { "allow": [ "POST" ] } } } } ``` ## Poll for Activation ```http POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate { "stateToken": "00wlafXU2GV9I3tNvDNkOA1thqM5gDwCOgHID_-Iej" } ``` ``` { "stateToken": "00lT7DEzQaeP6mv1_y3pdXjNEONzk83mXX-yhgEdVQ", "expiresAt": "2014-11-03T00:46:09.700Z", "status": "MFA_ENROLL_ACTIVATE", "relayState": "/myapp/some/deep/link/i/want/to/return/to", "factorResult": "WAITING", "_embedded": { "user": { "id": "00ub0oNGTSWTBKOLGLNR", "profile": { "login": "isaac@example.org", "firstName": "Isaac", "lastName": "Brock", "locale": "en_US", "timeZone": "America/Los_Angeles" } }, "factor": { "id": "opfh52xcuft3J4uZc0g3", "factorType": "push", "provider": "OKTA", "profile": { }, "_embedded": { "activation": { "deviceActivationToken": "I17JQoOqbYOPH_lMWK5F", "_links": { "qrcode": { "href": "https://your-domain.okta.com/api/v1/users/00uoy3CXZHSMMJPHYXXP/factors/opfh52xcuft3J4uZc0g3/qr/00Mb0zqhJQohwCDkB2wOifajAsAosEAXvDwuCmsAZs", "type": "image/png" } } } } } }, "_links": { "next": { "name": "activate", "href": "https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate", "hints": { "allow": [ "POST" ] } }, "cancel": { "href": "https://your-domain.okta.com/api/v1/authn/cancel", "hints": { "allow": [ "POST" ] } }, "prev": { "href": "https://nag.okta1.com:80/api/v1/authn/previous", "hints": { "allow": [ "POST" ] } } } } ``` ## Complete Enrollment ```http POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate { "stateToken": "00wlafXU2GV9I3tNvDNkOA1thqM5gDwCOgHID_-Iej" } ``` ``` { "expiresAt": "2014-11-03T10:15:57.000Z", "status": "SUCCESS", "relayState": "/myapp/some/deep/link/i/want/to/return/to", "sessionToken": "00Fpzf4en68pCXTsMjcX8JPMctzN2Wiw4LDOBL_9pe", "_embedded": { "user": { "id": "00ub0oNGTSWTBKOLGLNR", "profile": { "login": "isaac@example.org", "firstName": "Isaac", "lastName": "Brock", "locale": "en_US", "timeZone": "America/Los_Angeles" } } } } ``` #Enroll (From UserAgent): ## Request -
karlmcguinness-okta revised this gist
Apr 2, 2015 . 1 changed file with 152 additions and 166 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,18 @@ #Enroll (From UserAgent): ## Request **POST {{url}}/api/v1/users/{{userId}}/factors** ```json { "factorType": "push", "provider": "OKTA" } ``` ## Response ```json { "id": "opfh52xcuft3J4uZc0g3", @@ -19,17 +22,7 @@ "created": "2015-04-01T15:57:32.000Z", "lastUpdated": "2015-04-01T15:57:32.000Z", "profile": { }, "_links": { "activate": { @@ -63,97 +56,90 @@ }, "_embedded": { "activation": { "deviceActivationToken": "I17JQoOqbYOPH_lMWK5F" } } } ``` # After Activation: ##Request **GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}**?expand=device ##Response: ```json { "id": "opfh52xcuft3J4uZc0g3", "factorType": "push", "provider": "OKTA", "status": "ACTIVE", "created": "2015-04-01T15:57:32.000Z", "lastUpdated": "2015-04-01T16:04:56.000Z", "profile": { "keys": [ { "kty": "PKIX", "use": "sig", "kid": "default", "x5c": [ "MIIDPDCCAiQCCQDydJgOlszqbzANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEQMA4GA1UEChMHSmFua3lDbzESMBAGA1UEAxMJbG9jYWxob3N0MB4XDTE0MDMxMjE5NDYzM1oXDTI3MTExOTE5NDYzM1owYDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xEDAOBgNVBAoTB0phbmt5Q28xEjAQBgNVBAMTCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMGvJpRTTasRUSPqcbqCG+ZnTAurnu0vVpIG9lzExnh11o/BGmzu7lB+yLHcEdwrKBBmpepDBPCYxpVajvuEhZdKFx/Fdy6j5mH3rrW0Bh/zd36CoUNjbbhHyTjeM7FN2yF3u9lcyubuvOzr3B3gX66IwJlU46+wzcQVhSOlMk2tXR+fIKQExFrOuK9tbX3JIBUqItpI+HnAow509CnM134svw8PTFLkR6/CcMqnDfDK1m993PyoC1Y+N4X9XkhSmEQoAlAHPI5LHrvuujM13nvtoVYvKYoj7ScgumkpWNEvX652LfXOnKYlkB8ZybuxmFfIkzedQrbJsyOhfL03cMECAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAeHwzqwnzGEkxjzSD47imXaTqtYyETZow7XwBc0ZaFS50qRFJUgKTAmKS1xQBP/qHpStsROT35DUxJAE6NY1Kbq3ZbCuhGoSlY0L7VzVT5tpu4EY8+Dq/u2EjRmmhoL7UkskvIZ2n1DdERtd+YUMTeqYl9co43csZwDno/IKomeN5qaPc39IZjikJ+nUC6kPFKeu/3j9rgHNlRtocI6S1FdtFz9OZMQlpr0JbUt2T3xS/YoQJn6coDmJL5GTiiKM6cOe+Ur1VwzS1JEDbSS2TWWhzq8ojLdrotYLGd9JOsoQhElmz+tMfCFQUFLExinPAyy7YHlSiVX13QH2XTu/iQQ==" ] } ] }, "_embedded": { "device": { "id": "mbdg6uYNMQTFLDUUICST", "status": "ACTIVE", "created": "2014-08-20T04:53:45.000Z", "lastUpdated": "2014-08-20T04:55:02.000Z", "profile": { "udid": "33ec98baeba682a74cf87b73e5526f87fc8c4734", "platform": "IOS", "deviceType": "SMARTPHONE", "name": "karl iPhone", "version": "8.1", "serial": "F4KLVLTAFCM8" } } }, "_links": { "self": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3", "hints": { "allow": [ "GET", "DELETE" ] } }, "verify": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify", "hints": { "allow": [ "POST" ] } }, "user": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3", "hints": { "allow": [ "GET" ] } }, "device": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/devices/mbdg6uYNMQTFLDUUICST", "hints": { "allow": [ "GET" ] } } } } ``` @@ -173,25 +159,25 @@ HTTP/1.1 202 Accepted Location: https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g3 { "factorResult": "WAITING", "_links": { "poll": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g", "hints": { "allow": [ "GET" ] } }, "cancel": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g", "hints": { "allow": [ "DELETE" ] } } } } ``` @@ -204,25 +190,25 @@ Location: https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opf ## Response: ```json { "factorResult": "WAITING", "_links": { "poll": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g", "hints": { "allow": [ "GET" ] } }, "cancel": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g", "hints": { "allow": [ "DELETE" ] } } } } ``` @@ -235,7 +221,7 @@ Location: https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opf ## Response: ```json { "factorResult": "SUCCESS" } ``` @@ -249,26 +235,26 @@ Response: ```json { "factorResult": "TIMEOUT", "_links": { "verify": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify", "hints": { "allow": [ "POST" ] } }, "factor": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3", "hints": { "allow": [ "GET", "DELETE" ] } } } } ``` @@ -282,25 +268,25 @@ Response: ```json { "factorResult": "REJECTED", "_links": { "verify": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify", "hints": { "allow": [ "POST" ] } }, "factor": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3", "hints": { "allow": [ "GET", "DELETE" ] } } } } ``` -
karlmcguinness-okta revised this gist
Apr 2, 2015 . 1 changed file with 36 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -89,17 +89,43 @@ "created": "2015-04-01T15:57:32.000Z", "lastUpdated": "2015-04-01T16:04:56.000Z", "profile": { "keys": [ { "kty": "PKIX", "use": "sig", "kid": "default", "x5c": [ "MIIDPDCCAiQCCQDydJgOlszqbzANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEQMA4GA1UEChMHSmFua3lDbzESMBAGA1UEAxMJbG9jYWxob3N0MB4XDTE0MDMxMjE5NDYzM1oXDTI3MTExOTE5NDYzM1owYDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xEDAOBgNVBAoTB0phbmt5Q28xEjAQBgNVBAMTCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMGvJpRTTasRUSPqcbqCG+ZnTAurnu0vVpIG9lzExnh11o/BGmzu7lB+yLHcEdwrKBBmpepDBPCYxpVajvuEhZdKFx/Fdy6j5mH3rrW0Bh/zd36CoUNjbbhHyTjeM7FN2yF3u9lcyubuvOzr3B3gX66IwJlU46+wzcQVhSOlMk2tXR+fIKQExFrOuK9tbX3JIBUqItpI+HnAow509CnM134svw8PTFLkR6/CcMqnDfDK1m993PyoC1Y+N4X9XkhSmEQoAlAHPI5LHrvuujM13nvtoVYvKYoj7ScgumkpWNEvX652LfXOnKYlkB8ZybuxmFfIkzedQrbJsyOhfL03cMECAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAeHwzqwnzGEkxjzSD47imXaTqtYyETZow7XwBc0ZaFS50qRFJUgKTAmKS1xQBP/qHpStsROT35DUxJAE6NY1Kbq3ZbCuhGoSlY0L7VzVT5tpu4EY8+Dq/u2EjRmmhoL7UkskvIZ2n1DdERtd+YUMTeqYl9co43csZwDno/IKomeN5qaPc39IZjikJ+nUC6kPFKeu/3j9rgHNlRtocI6S1FdtFz9OZMQlpr0JbUt2T3xS/YoQJn6coDmJL5GTiiKM6cOe+Ur1VwzS1JEDbSS2TWWhzq8ojLdrotYLGd9JOsoQhElmz+tMfCFQUFLExinPAyy7YHlSiVX13QH2XTu/iQQ==" ] } ] }, "_embedded": { "device": { "id": "mbdg6uYNMQTFLDUUICST", "status": "ACTIVE", "created": "2014-08-20T04:53:45.000Z", "lastUpdated": "2014-08-20T04:55:02.000Z", "profile": { "udid": "33ec98baeba682a74cf87b73e5526f87fc8c4734", "platform": "IOS", "deviceType": "SMARTPHONE", "name": "karl iPhone", "version": "8.1", "serial": "F4KLVLTAFCM8" }, "_links": { "self": { "href": "http://rain.okta1.com:1802/api/v1/users/00ujfwNKKFHNNCDVACKP/devices/mbdg6uYNMQTFLDUUICST", "hints": { "allow": [ "GET", "DELETE" ] } } } } }, "_links": { "verify": { -
karlmcguinness-okta revised this gist
Apr 2, 2015 . 1 changed file with 81 additions and 24 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -134,72 +134,129 @@ ###Gaps/Issues: 1. Add "reset" link # Start Challenge: ## Request **POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify** ## Response ```http HTTP/1.1 202 Accepted Location: https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g3 { "factorResult": "WAITING", "_links": { "poll": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g", "hints": { "allow": [ "GET" ] } }, "cancel": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g", "hints": { "allow": [ "DELETE" ] } } } } ``` # Poll ## Request: **GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}}** ## Response: ```json { "factorResult": "WAITING", "_links": { "poll": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g", "hints": { "allow": [ "GET" ] } }, "cancel": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g", "hints": { "allow": [ "DELETE" ] } } } } ``` # After Auth is Approved on Device: ## Request: **GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}}** ## Response: ```json { "factorResult": "SUCCESS" } ``` # When timed-out: ## Request: **GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}} Response: ```json { "factorResult": "TIMEOUT", "_links": { "verify": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify", "hints": { "allow": [ "POST" ] } }, "factor": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3", "hints": { "allow": [ "GET", "DELETE" ] } } } } ``` # When Rejected: ## Request: **GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}} Response: ```json { "factorResult": "REJECTED", "_links": { "verify": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify", -
srinivasanagandla-okta revised this gist
Apr 1, 2015 . No changes.There are no files selected for viewing
-
srinivasanagandla-okta revised this gist
Apr 1, 2015 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -131,6 +131,9 @@ } ``` ###Gaps/Issues: 1. Add "reset" link #Start Challenge: ##Request: -
srinivasanagandla-okta revised this gist
Apr 1, 2015 . 1 changed file with 16 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -166,7 +166,23 @@ 1. Rename "verify" link to "poll" #After Auth is Approved on Device: ##Request: **POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify** ```json { "transactionId":"mst1eiHghhPxf0yhp0g3" } ``` ##Response: ```json { "factorResult": "SUCCESS" } ``` ###Gaps/Issues: 1. Currently we expect "rawToken" as "transactionId" in the request. This need to be changed to transactionId. #When timed-out: -
srinivasanagandla-okta revised this gist
Apr 1, 2015 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -69,6 +69,10 @@ } } ``` ###Gaps/Issues 1. Don't show "keys" 2. Fix links in "_embedded->activation" 3. Remove "activate" link #After Activation: @@ -158,6 +162,8 @@ } } ``` ### Gaps/Issues: 1. Rename "verify" link to "poll" #After Auth is Approved on Device: -
srinivasanagandla-okta revised this gist
Apr 1, 2015 . 1 changed file with 19 additions and 22 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,15 @@ #Enroll (From UserAgent): ##Request **POST {{url}}/api/v1/users/{{userId}}/factors** ```json { "factorType" : "push", "provider" : "okta" } ``` ##Response ```json { "id": "opfh52xcuft3J4uZc0g3", @@ -72,13 +70,12 @@ Response } ``` #After Activation: ##Request: **GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}** ##Response: ```json { "id": "opfh52xcuft3J4uZc0g3", @@ -130,13 +127,13 @@ Response: } ``` #Start Challenge: ##Request: **POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify** ##Response: ```json { "factorResult": "WAITING", @@ -162,13 +159,13 @@ Response: } ``` #After Auth is Approved on Device: #When timed-out: ##Request: **POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify** ```json { "transactionId":"mst1eiHghhPxf0yhp0g3" -
srinivasanagandla-okta created this gist
Apr 1, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,201 @@ Enroll (From UserAgent): Request ======= POST {{url}}/api/v1/users/{{userId}}/factors ```json { "factorType" : "push", "provider" : "okta" } ``` Response ======== ```json { "id": "opfh52xcuft3J4uZc0g3", "factorType": "push", "provider": "OKTA", "status": "PENDING_ACTIVATION", "created": "2015-04-01T15:57:32.000Z", "lastUpdated": "2015-04-01T15:57:32.000Z", "profile": { "credentialId": "nag@test.com", "keys": [ { "kty": "PKIX", "use": "sig", "kid": "default", "x5c": [ null ] } ] }, "_links": { "activate": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate", "hints": { "allow": [ "POST" ] } }, "self": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3", "hints": { "allow": [ "GET" ] } }, "user": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3", "hints": { "allow": [ "GET" ] } }, "qrcode": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/qr/00CnAHABTzHh9hjEij9qcteMrOoeFLK6evHruUH7p9", "type": "image/png" } }, "_embedded": { "activation": { "links": null, "deviceActivationToken": "I17JQoOqbYOPH_lMWK5F" } } } ``` After Activation: ================= Request: GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}} Response: ```json { "id": "opfh52xcuft3J4uZc0g3", "factorType": "push", "provider": "OKTA", "status": "ACTIVE", "created": "2015-04-01T15:57:32.000Z", "lastUpdated": "2015-04-01T16:04:56.000Z", "profile": { "credentialId": "nag@test.com", "keys": [ { "kty": "PKIX", "use": "sig", "kid": "default", "x5c": [ "MIIDPDCCAiQCCQDydJgOlszqbzANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEQMA4GA1UEChMHSmFua3lDbzESMBAGA1UEAxMJbG9jYWxob3N0MB4XDTE0MDMxMjE5NDYzM1oXDTI3MTExOTE5NDYzM1owYDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xEDAOBgNVBAoTB0phbmt5Q28xEjAQBgNVBAMTCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMGvJpRTTasRUSPqcbqCG+ZnTAurnu0vVpIG9lzExnh11o/BGmzu7lB+yLHcEdwrKBBmpepDBPCYxpVajvuEhZdKFx/Fdy6j5mH3rrW0Bh/zd36CoUNjbbhHyTjeM7FN2yF3u9lcyubuvOzr3B3gX66IwJlU46+wzcQVhSOlMk2tXR+fIKQExFrOuK9tbX3JIBUqItpI+HnAow509CnM134svw8PTFLkR6/CcMqnDfDK1m993PyoC1Y+N4X9XkhSmEQoAlAHPI5LHrvuujM13nvtoVYvKYoj7ScgumkpWNEvX652LfXOnKYlkB8ZybuxmFfIkzedQrbJsyOhfL03cMECAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAeHwzqwnzGEkxjzSD47imXaTqtYyETZow7XwBc0ZaFS50qRFJUgKTAmKS1xQBP/qHpStsROT35DUxJAE6NY1Kbq3ZbCuhGoSlY0L7VzVT5tpu4EY8+Dq/u2EjRmmhoL7UkskvIZ2n1DdERtd+YUMTeqYl9co43csZwDno/IKomeN5qaPc39IZjikJ+nUC6kPFKeu/3j9rgHNlRtocI6S1FdtFz9OZMQlpr0JbUt2T3xS/YoQJn6coDmJL5GTiiKM6cOe+Ur1VwzS1JEDbSS2TWWhzq8ojLdrotYLGd9JOsoQhElmz+tMfCFQUFLExinPAyy7YHlSiVX13QH2XTu/iQQ==" ] } ] }, "_links": { "verify": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify", "hints": { "allow": [ "POST" ] } }, "self": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3", "hints": { "allow": [ "GET", "DELETE" ] } }, "user": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3", "hints": { "allow": [ "GET" ] } } } } ``` Start Challenge: ================ Request: POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify Response: ```json { "factorResult": "WAITING", "_links": { "verify": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify", "hints": { "allow": [ "POST" ] } }, "factor": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3", "hints": { "allow": [ "GET", "DELETE" ] } } } } ``` After Auth is Approved on Device: ================================= When timed-out: =============== Request: POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify ```json { "transactionId":"mst1eiHghhPxf0yhp0g3" } ``` Response: ```json { "factorResult": "TIMEOUT", "_links": { "verify": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify", "hints": { "allow": [ "POST" ] } }, "factor": { "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3", "hints": { "allow": [ "GET", "DELETE" ] } } } } ```