xo::oauth::GitHub method get_api_data (protected)

 <instance of xo::oauth::GitHub[i]> get_api_data access_token

Defined in packages/xooauth/tcl/authorize-procs.tcl

Parameters:
access_token

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.
Source code:
set data [ns_http run  -headers [ns_set create query Authorization "Bearer $access_token"]  https://api.github.com/user]
if {[dict get $data status] ne 200} {
    dict set result error oacs-cant_get_api_data
    dict set result error_description $data
} else {
    set json_body [dict get $data body]
    dict set result claims [:json_to_dict $json_body]
}
ns_log notice "[self] get_api_data $access_token returns $result"
return $result
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: