27

Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG
Page 2: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG
Page 4: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

Page 5: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

HTTP/1.1 302 Found

Location: https://callback_url.com/callback?code=SplxlOBeZQQYbYS6WxSbIA

&state=af0ifjsldkj

HTTP/1.1 400 OK

Content-Type: application/json;charset=UTF-8

Page 6: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

Cache-Control: no-store

Pragma: no-cache

error "invalid_client"

error_description "The client id supplied is invalid"

Page 7: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

Page 8: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG
Page 9: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

HTTP/1.1 200 OK

Content-Type: application/json;charset=UTF-8

Cache-Control: no-store

Pragma: no-cache

{

"access_token": "2YotnFZFEjr1zCsicMWpAA",

"refresh_token": "2YotnFZFEjr1zCsicMWpAA",

"expires_in": 3600,

"scope": "fitness"

}

Page 10: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

HTTP/1.1 400 OK

Content-Type: application/json;charset=UTF-8

Cache-Control: no-store

Pragma: no-cache

{

"error": "access_denied"

}

Page 11: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

Page 12: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

GET /userinfo HTTP/1.1

Host: server-location.domain

Authorization: Bearer SlAV32hkKG

Page 13: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

HTTP/1.1 200 OK

Content-Type: application/json;charset=UTF-8

Cache-Control: no-store

Pragma: no-cache

{

"avatar": "http://example.com/janedoe/me.jpg",

"email": "[email protected]",

"first_name": "Jane",

"last_name": "Doe",

"nickname": "test",

"sub": "248289761001"

}

Page 14: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

HTTP/1.1 401 Unauthorized

Content-Type: application/json;charset=UTF-8

Cache-Control: no-store

Pragma: no-cache

{

"error": "invalid_token",

"error_description": "The Access Token expired"

}

Page 15: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

Page 16: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

POST /token HTTP/1.1

Host: server-location.domain

Content-Type: application/x-www-form-urlencoded

grant_type=refresh_token&refresh_token=PC9Bc3nRpb2NlcnRpb24&client_id=third

partyid

Page 17: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

HTTP/1.1 200 OK

Content-Type: application/json;charset=UTF-8

Cache-Control: no-store

Pragma: no-cache

{

"access_token": "2YotnFZFEjr1zCsicMWpAA",

"expires_in": 3600,

"scope": "fitness"

}

Page 18: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

HTTP/1.1 400 OK

Content-Type: application/json;charset=UTF-8

Cache-Control: no-store

Pragma: no-cache

{

"error": "access_denied"

}

Page 19: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

Page 20: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

Page 21: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG
Page 22: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

HTTP/1.1 200 OK

Content-Type: application/json;charset=UTF-8

Cache-Control: no-store

Pragma: no-cache

{

"client_id": "com.developer.app1",

"open_id": "rzr_xxxxxxxxxxx",

"scope": "fitness",

"expires_in": 436

}

Page 23: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

HTTP/1.1 401 Unauthorized

Content-Type: application/json;charset=UTF-8

Cache-Control: no-store

Pragma: no-cache

{

"error": "invalid_token",

"error_description": "The access token provided is invalid"

}

Page 24: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

Page 25: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

HTTP/1.1 200 OK

Content-Type: application/json;charset=UTF-8

Cache-Control: no-store

Pragma: no-cache

Page 26: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG

HTTP/1.1 400 OK

Content-Type: application/json;charset=UTF-8

Cache-Control: no-store

Pragma: no-cache

{

"error": "temporarily_unavailable"

}

Page 27: Razer Inc. · GET /userinfo HTTP/1.1 Host: server-location.domain Authorization: Bearer SlAV32hkKG