PHP Class org\Oauth

Datei anzeigen Open project: top-think/thinkphp-extend

Protected Properties

Property Type Description
$handler object 操作句柄

Public Methods

Method Description
call ( $api, $param = '', $method = 'GET' ) 调用oauth接口API
connect ( string $type, array $options = [] ) : object 连接oauth
getAccessToken ( $code ) 获取access_token
getOauthInfo ( ) 获取oauth用户信息
getOpenId ( ) 获取openid信息
login ( $callback = '' ) 跳转到授权登录页面
setToken ( $token ) 设置保存过的token信息

Method Details

call() public static method

调用oauth接口API
public static call ( $api, $param = '', $method = 'GET' )

connect() public static method

连接oauth
public static connect ( string $type, array $options = [] ) : object
$type string Oauth类型
$options array 配置数组
return object

getAccessToken() public static method

获取access_token
public static getAccessToken ( $code )

getOauthInfo() public static method

获取oauth用户信息
public static getOauthInfo ( )

getOpenId() public static method

获取openid信息
public static getOpenId ( )

login() public static method

跳转到授权登录页面
public static login ( $callback = '' )

setToken() public static method

设置保存过的token信息
public static setToken ( $token )

Property Details

$handler protected_oe static_oe property

操作句柄
protected static object $handler
return object