Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save RafPe/6ead72d60805c57de4631c583cdcdf3c to your computer and use it in GitHub Desktop.

Select an option

Save RafPe/6ead72d60805c57de4631c583cdcdf3c to your computer and use it in GitHub Desktop.

Revisions

  1. @karlmcguinness-okta karlmcguinness-okta revised this gist May 1, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original 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"
    "stateToken": "00wlafXU2GV9I3tNvDNkOA1thqM5gDwCOgHID_-Iej",
    "profile": {
    "phoneNumber": "+1-555-415-1337"
    }
  2. @karlmcguinness-okta karlmcguinness-okta revised this gist May 1, 2015. 1 changed file with 10 additions and 5 deletions.
    15 changes: 10 additions & 5 deletions gistfile1.md
    Original 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/verify/mst1eiHghhPxf0yhp0g3
    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}}/verify/{{transactionId}}
    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}}/verify/{{transactionId}}
    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}}/verify/{{transactionId}}
    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}}/verify/{{transactionId}}
    GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/transactions/{transactionId}/verify
    ```

    #### Response
  3. @karlmcguinness-okta karlmcguinness-okta revised this gist Apr 30, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions gistfile1.md
    Original 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": {
  4. @karlmcguinness-okta karlmcguinness-okta revised this gist Apr 30, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion gistfile1.md
    Original 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"
    "factorResult": "WAITING",
    "_embedded": {
    "user": {
    "id": "00ub0oNGTSWTBKOLGLNR",
    @@ -981,6 +981,7 @@ HTTP/1.1 200 OK
    }
    }
    }
    ```

    ## Verify

  5. @karlmcguinness-okta karlmcguinness-okta revised this gist Apr 30, 2015. 1 changed file with 9 additions and 5 deletions.
    14 changes: 9 additions & 5 deletions gistfile1.md
    Original 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
    ```


    ## Activate Factor
    ## 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 Activation
    ## 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
    }
    ```

    ## Complete Enrollment
    ## 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
    }
    ```

    ## Activation Expired
    ## Poll for Device Activation Timeout

    When activation expires, the `next` link relation reverts to activate.

    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
  6. @karlmcguinness-okta karlmcguinness-okta revised this gist Apr 30, 2015. 1 changed file with 418 additions and 74 deletions.
    492 changes: 418 additions & 74 deletions gistfile1.md
    Original 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": {
    "deviceActivationToken": "I17JQoOqbYOPH_lMWK5F",
    "expiresAt": "2015-04-01T15:57:32.000Z",
    "_links": {
    "qrcode": {
    "href": "https://your-domain.okta.com/api/v1/users/00uoy3CXZHSMMJPHYXXP/factors/opfh52xcuft3J4uZc0g3/qr/00Mb0zqhJQohwCDkB2wOifajAsAosEAXvDwuCmsAZs",
    "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://nag.okta1.com:80/api/v1/authn/previous",
    "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": {
    "deviceActivationToken": "I17JQoOqbYOPH_lMWK5F",
    "expiresAt": "2015-04-01T15:57:32.000Z",
    "_links": {
    "qrcode": {
    "href": "https://your-domain.okta.com/api/v1/users/00uoy3CXZHSMMJPHYXXP/factors/opfh52xcuft3J4uZc0g3/qr/00Mb0zqhJQohwCDkB2wOifajAsAosEAXvDwuCmsAZs",
    "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://nag.okta1.com:80/api/v1/authn/previous",
    "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": {
    "deviceActivationToken": "I17JQoOqbYOPH_lMWK5F",
    "expiresAt": "2015-04-01T15:57:32.000Z",
    "_links": {
    "qrcode": {
    "href": "https://your-domain.okta.com/api/v1/users/00uoy3CXZHSMMJPHYXXP/factors/opfh52xcuft3J4uZc0g3/qr/00Mb0zqhJQohwCDkB2wOifajAsAosEAXvDwuCmsAZs",
    "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://nag.okta1.com:80/api/v1/authn/previous",
    "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
    }
    ```

    # Enroll Factor API:
    # Factor API

    ## Request
    ## Enroll

    **POST {{url}}/api/v1/users/{{userId}}/factors**
    ### Enroll Factor

    #### Request

    ```http
    POST {{url}}/api/v1/users/{{userId}}/factors
    ```json
    {
    "factorType": "push",
    "provider": "OKTA"
    }
    ```

    ## Response
    #### Response

    ```json
    {
    @@ -549,51 +783,131 @@ HTTP/1.1 200 OK

    },
    "_links": {
    "activate": {
    "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate",
    "poll": {
    "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate",
    "hints": {
    "allow": [
    "POST"
    ]
    }
    },
    "self": {
    "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3",
    "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3",
    "hints": {
    "allow": [
    "GET"
    ]
    }
    },
    "user": {
    "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3",
    "href": "https://your-domain.okta.com/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": {
    "deviceActivationToken": "I17JQoOqbYOPH_lMWK5F"
    "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"
    ]
    }
    }
    ]
    }
    }
    }
    }
    ```

    # After Activation:
    ### Poll for Device Activation to Complete

    #### Request

    ##Request
    ```http
    POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/lifecycle/activate
    ```

    **GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}**?expand=device
    #### 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
    ##Response:
    ```json
    {
    "id": "opfh52xcuft3J4uZc0g3",
    "factorType": "push",
    @@ -609,7 +923,7 @@ HTTP/1.1 200 OK
    },
    "_links": {
    "self": {
    "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3",
    "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://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify",
    "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify",
    "hints": {
    "allow": [
    "POST"
    ]
    }
    },
    "user": {
    "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3",
    "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3",
    "hints": {
    "allow": [
    "GET"
    ]
    }
    },
    "device": {
    "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/devices/mbdg6uYNMQTFLDUUICST",
    }
    }
    }
    ```

    ### 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": [
    "GET"
    "POST"
    ]
    }
    }
    }
    }
    ```
    ###Gaps/Issues:
    1. Add "reset" link
    ## Verify
    # Start Challenge:
    ### Start Verify Transaction
    ## Request
    #### Request
    **POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify**
    ```http
    POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify
    ```

    ## Response
    #### Response

    ```http
    HTTP/1.1 202 Accepted
    Location: https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g3
    Location: https://your-domain.okta.com/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",
    "href": "https://your-domain.okta.com/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",
    "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
    ### Poll Verify Transaction

    ## Request:
    #### Request:

    ```http
    GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}}
    ```

    **GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}}**
    #### Response

    ## Response:
    ```json
    {
    "factorResult": "WAITING",
    "_links": {
    "poll": {
    "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g",
    "href": "https://your-domain.okta.com/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",
    "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
    }
    ```

    # After Auth is Approved on Device:
    ### Verify Transaction Approved Poll Result

    #### Request:

    ## Request:
    ```http
    GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}}
    ```

    **GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}}**
    #### Response

    ## Response:
    ```json
    {
    "factorResult": "SUCCESS"
    }
    ```

    # When timed-out:
    ### Verify Transaction Timout Poll Result

    ## Request:
    #### Request

    **GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}}
    ```http
    GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}}
    ```

    Response:
    #### Response

    ```json
    {
    "factorResult": "TIMEOUT",
    "_links": {
    "verify": {
    "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify",
    "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify",
    "hints": {
    "allow": [
    "POST"
    ]
    }
    },
    "factor": {
    "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3",
    "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3",
    "hints": {
    "allow": [
    "GET",
    @@ -760,28 +1102,30 @@ Response:
    }
    ```

    # When Rejected:
    ### Verify Transaction Rejected Poll Result

    ## Request:
    #### Request

    **GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}}
    ```http
    GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}}
    ```

    Response:
    #### Response

    ```json
    {
    "factorResult": "REJECTED",
    "_links": {
    "verify": {
    "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify",
    "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify",
    "hints": {
    "allow": [
    "POST"
    ]
    }
    },
    "factor": {
    "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3",
    "href": "https://your-domain.okta.com/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3",
    "hints": {
    "allow": [
    "GET",
  7. @karlmcguinness-okta karlmcguinness-okta revised this gist Apr 6, 2015. No changes.
  8. @karlmcguinness-okta karlmcguinness-okta revised this gist Apr 4, 2015. 1 changed file with 12 additions and 61 deletions.
    73 changes: 12 additions & 61 deletions gistfile1.md
    Original 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": {
    },
    "_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"
    }
    }
    "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": {
    },
    "_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"
    }
    }
    "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": {
    "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"
    }
    }
    "platform": "IOS",
    "deviceType": "SMARTPHONE",
    "name": "karl iPhone",
    "version": "8.1"
    },
    "_links": {
    "self": {
  9. @karlmcguinness-okta karlmcguinness-okta revised this gist Apr 3, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -516,10 +516,10 @@ HTTP/1.1 202 Accepted
    }
    ```

    ## Verify Complete
    ## Poll for Verification Complete

    ```http
    POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/lifecycle/activate
    POST https://your-domain.okta.com/api/v1/authn/factors/opfh52xcuft3J4uZc0g3/verify
    {
    "stateToken": "00wlafXU2GV9I3tNvDNkOA1thqM5gDwCOgHID_-Iej"
  10. @karlmcguinness-okta karlmcguinness-okta revised this gist Apr 3, 2015. 1 changed file with 223 additions and 6 deletions.
    229 changes: 223 additions & 6 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,10 @@


    # Enroll via Auth API

    ## Primary Authentication

    ```http
    POST {{url}}/api/v1/authn
    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 {{url}}/api/v1/authn/factors
    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": "activate",
    "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": "activate",
    "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 (From UserAgent):
    # Enroll Factor API:

    ## Request

  11. @karlmcguinness-okta karlmcguinness-okta revised this gist Apr 3, 2015. 1 changed file with 334 additions and 0 deletions.
    334 changes: 334 additions & 0 deletions gistfile1.md
    Original 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
  12. @karlmcguinness-okta karlmcguinness-okta revised this gist Apr 2, 2015. 1 changed file with 152 additions and 166 deletions.
    318 changes: 152 additions & 166 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,18 @@
    #Enroll (From UserAgent):

    ##Request
    ## Request

    **POST {{url}}/api/v1/users/{{userId}}/factors**

    ```json
    {
    "factorType" : "push",
    "provider" : "okta"
    "factorType": "push",
    "provider": "OKTA"
    }
    ```

    ##Response
    ## Response

    ```json
    {
    "id": "opfh52xcuft3J4uZc0g3",
    @@ -19,17 +22,7 @@
    "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": {
    @@ -63,97 +56,90 @@
    },
    "_embedded": {
    "activation": {
    "links": null,
    "deviceActivationToken": "I17JQoOqbYOPH_lMWK5F"
    }
    }
    }
    ```
    ###Gaps/Issues
    1. Don't show "keys"
    2. Fix links in "_embedded->activation"
    3. Remove "activate" link

    #After Activation:
    # After Activation:

    ##Request

    ##Request:
    **GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}**
    **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=="
    ]
    }
    ]
    "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"
    ]
    }
    },
    "_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"
    ]
    }
    }
    }
    "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"
    ]
    }
    },
    "_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"
    ]
    }
    }
    "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"
    ]
    }
    }
    "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"
    ]
    }
    }
    "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"
    "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"
    ]
    }
    }
    "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"
    ]
    }
    }
    "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"
    ]
    }
    }
    }
    }
    ```
  13. @karlmcguinness-okta karlmcguinness-okta revised this gist Apr 2, 2015. 1 changed file with 36 additions and 10 deletions.
    46 changes: 36 additions & 10 deletions gistfile1.md
    Original 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": {
    "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=="
    ]
    "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": {
  14. @karlmcguinness-okta karlmcguinness-okta revised this gist Apr 2, 2015. 1 changed file with 81 additions and 24 deletions.
    105 changes: 81 additions & 24 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -134,72 +134,129 @@
    ###Gaps/Issues:
    1. Add "reset" link

    #Start Challenge:
    # Start Challenge:

    ##Request:
    ## Request

    **POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify**

    ##Response:
    ```json
    ## Response

    ```http
    HTTP/1.1 202 Accepted
    Location: https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g3
    {
    "factorResult": "WAITING",
    "_links": {
    "verify": {
    "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify",
    "poll": {
    "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g",
    "hints": {
    "allow": [
    "POST"
    "GET"
    ]
    }
    },
    "factor": {
    "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3",
    "cancel": {
    "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify/mst1eiHghhPxf0yhp0g",
    "hints": {
    "allow": [
    "GET",
    "DELETE"
    ]
    }
    }
    }
    }
    ```
    ### Gaps/Issues:
    1. Rename "verify" link to "poll"

    #After Auth is Approved on Device:
    ##Request:
    **POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify**
    # Poll

    ## Request:

    **GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}}**

    ## Response:
    ```json
    {
    "transactionId":"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"
    ]
    }
    }
    }
    }
    ```

    ##Response:
    # After Auth is Approved on Device:

    ## Request:

    **GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}}**

    ## 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:

    #When timed-out:
    ## Request:

    **GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify/{{transactionId}}

    Response:

    ##Request:
    **POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify**
    ```json
    {
    "transactionId":"mst1eiHghhPxf0yhp0g3"
    "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": "TIMEOUT",
    "factorResult": "REJECTED",
    "_links": {
    "verify": {
    "href": "https://nag.okta1.com:80/api/v1/users/00ugti3kwafWJBRIY0g3/factors/opfh52xcuft3J4uZc0g3/verify",
  15. @srinivasanagandla-okta srinivasanagandla-okta revised this gist Apr 1, 2015. No changes.
  16. @srinivasanagandla-okta srinivasanagandla-okta revised this gist Apr 1, 2015. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -131,6 +131,9 @@
    }
    ```

    ###Gaps/Issues:
    1. Add "reset" link

    #Start Challenge:

    ##Request:
  17. @srinivasanagandla-okta srinivasanagandla-okta revised this gist Apr 1, 2015. 1 changed file with 16 additions and 0 deletions.
    16 changes: 16 additions & 0 deletions gistfile1.md
    Original 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:

  18. @srinivasanagandla-okta srinivasanagandla-okta revised this gist Apr 1, 2015. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions gistfile1.md
    Original 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:

  19. @srinivasanagandla-okta srinivasanagandla-okta revised this gist Apr 1, 2015. 1 changed file with 19 additions and 22 deletions.
    41 changes: 19 additions & 22 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,15 @@
    Enroll (From UserAgent):
    #Enroll (From UserAgent):

    Request
    =======
    POST {{url}}/api/v1/users/{{userId}}/factors
    ##Request
    **POST {{url}}/api/v1/users/{{userId}}/factors**
    ```json
    {
    "factorType" : "push",
    "provider" : "okta"
    }
    ```

    Response
    ========
    ##Response
    ```json
    {
    "id": "opfh52xcuft3J4uZc0g3",
    @@ -72,13 +70,12 @@ Response
    }
    ```

    After Activation:
    =================
    #After Activation:

    Request:
    GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}
    ##Request:
    **GET {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}**

    Response:
    ##Response:
    ```json
    {
    "id": "opfh52xcuft3J4uZc0g3",
    @@ -130,13 +127,13 @@ Response:
    }
    ```

    Start Challenge:
    ================
    Request:
    #Start Challenge:

    POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify
    ##Request:

    Response:
    **POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify**

    ##Response:
    ```json
    {
    "factorResult": "WAITING",
    @@ -162,13 +159,13 @@ Response:
    }
    ```

    After Auth is Approved on Device:
    =================================
    #After Auth is Approved on Device:


    #When timed-out:

    When timed-out:
    ===============
    Request:
    POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify
    ##Request:
    **POST {{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify**
    ```json
    {
    "transactionId":"mst1eiHghhPxf0yhp0g3"
  20. @srinivasanagandla-okta srinivasanagandla-okta created this gist Apr 1, 2015.
    201 changes: 201 additions & 0 deletions gistfile1.md
    Original 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"
    ]
    }
    }
    }
    }
    ```