oops-OAUTH2
[ class tree: oops-OAUTH2 ] [ index: oops-OAUTH2 ] [ all elements ]

Class: GITHUB

Source Location: /OAUTH2/OAUTH2/GITHUB.php

Class Overview


GITHUB pear pcakge의 main class


Author(s):

Copyright:

  • (c) 2019, OOPS.org

Variables

Methods



Class Details

[line 47]
GITHUB pear pcakge의 main class

OAuth2를 이용하여 GITHUB 로그인을 진행하고, 로그인된 사용자의 정보를 얻어온다.




Tags:

author:  JoungKyun.Kim <http://oops.org>
copyright:  (c) 2019, OOPS.org
example:  GITHUB pear 예제 코드
license:  BSD


[ Top ]


Class Variables

$sess =

[line 96]

GITHUB 로그인에 필요한 session 값



Tags:

access:  public

Type:   stdClass


[ Top ]



Class Methods


constructor __construct [line 115]

void __construct( stdClass $v)

GITHUB 로그인 인증 과정을 수행한다. 인증 과정 중에 에러가 발생하면 myException 으로 에러 메시지를 보낸다.

logout 시에 globale 변수 $_OAUTH2_LOGOUT_TEMPALTE_ 로 사용자 logout template 을 지정할 수 있다. template 파일은 pear/OAUTH2/login-no-auto.template 를 참조하면 된다.




Tags:

access:  public


Parameters:

stdClass   $v  
    • secret 발급받은 GITHUB login Application Scret key
    • callback 이 클래스가 호출되는 url

    [ Top ]

    method Profile [line 290]

    stdClass Profile( )

    로그인 과정이 완료되면 발급받은 oops\OAUTH2\GITHUB::$sess->oauth 에 등록된 키를 이용하여 로그인 사용자의 정보를 가져온다.



    Tags:

    return:  다음의 object를 반환
    • id 사용자 UID
    • name 사용자 별칭
    • email 이메일
    • img 프로필 사진 URL 정보
    • r GITHUB profile 원본 값
    access:  public


    [ Top ]

    method reqLogout [line 327]

    void reqLogout( )

    GITHUB 로그인의 authorization key를 만료 시키고 세션에 등록된 정보(oops\OAUT2\GITHUB::$sess)를 제거한다.



    Tags:

    access:  public


    [ Top ]


    Documentation generated on Tue, 14 May 2019 02:00:03 +0900 by phpDocumentor 1.4.4