Class ::xo::oauth::GitHub

::xo::oauth::GitHub[i] create ... \
           [ -after_successful_login_url (default "/pvt/") ] \
           [ -base_url (default "https://github.com/login/oauth") ] \
           [ -client_id client_id ] \
           [ -client_secret client_secret ] \
           [ -create_not_registered_users:boolean (default "false") ] \
           [ -create_with_dotlrn_role (default "") ] \
           [ -debug:boolean (default "false") ] \
           [ -login_failure_url (default "/") ] \
           [ -pretty_name (default "GitHub") ] \
           [ -responder_url (default "/oauth/github-login-handler") ] \
           [ -scope (default "read:user user:email") ]

Tailored OAuth handler for GitHub
Defined in packages/xooauth/tcl/authorize-procs.tcl

Class Relations

  • class: ::nx::Class[i]
  • superclass: ::xo::Authorize[i]

Methods (to be applied on instances)

  • get_user_data (scripted, public)

     <instance of xo::oauth::GitHub[i]> get_user_data [ -token token ] \
        [ -required_fields required_fields ]

    Get user data based on the temporary code (passed via "-token") provided by GitHub. First, convert the temporary code into an access_token, and use this to get the user data.

    Switches:
    -token (optional)
    -required_fields (optional, defaults to " {email email} {name name} ")

    Testcases:
    No testcase defined.
  • logout_url (scripted, public)

     <instance of xo::oauth::GitHub[i]> logout_url \
        [ -return_url return_url ]

    Returns the URL for logging out. E.g., GitHub has no logout, so provide simply a redirect URL (maybe, we should logout from the application?)

    Switches:
    -return_url (optional)

    Testcases:
    No testcase defined.