public class OALoginAdapter extends java.lang.Object implements ILoginAdapter
Modifier and Type | Class and Description |
---|---|
static interface |
OALoginAdapter.OALoginAdapterInitResultCallback |
class |
OALoginAdapter.OALoginCallback |
static interface |
OALoginAdapter.OnBeforeLogoutListener |
Constructor and Description |
---|
OALoginAdapter(Context context) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getSessionData()
返回当前会话信息
|
java.lang.String |
getSessionId()
获取当前会话ID
|
UserInfo |
getUserData()
返回用户信息
|
void |
init(java.lang.String env)
初始化
|
void |
init(java.lang.String evn,
java.lang.String suffix) |
void |
init(java.lang.String env,
java.lang.String suffix,
OALoginAdapter.OALoginAdapterInitResultCallback initResultCallback) |
boolean |
isLogin()
是否已经登录
|
void |
login(ILoginCallback callback)
登录
|
void |
login(ILoginCallback callback,
java.util.Map<java.lang.String,java.lang.String> params) |
void |
logout(ILogoutCallback callback)
登出
|
void |
refreshSession(boolean force,
IRefreshSessionCallback sessionListener)
刷新当前会话
|
void |
registerBeforeLogoutListener(OALoginAdapter.OnBeforeLogoutListener listener) |
void |
registerLoginListener(ILoginStatusChangeListener listener)
注册全局登录状态监听
|
void |
setDefaultLoginClass(java.lang.Class<?> defaultLoginClass) |
void |
setDefaultLoginParams(java.util.Map<java.lang.String,java.lang.String> loginParams) |
void |
setDefaultOAHost(java.lang.String host) |
void |
setIsDebuggable(boolean debuggable)
Account模块内部的日志调试开关
|
void |
setSupportAliYun(boolean supportAliYun) |
void |
showChangePwd(ILoginCallback callback) |
void |
unRegisterBeforeLogoutListener(OALoginAdapter.OnBeforeLogoutListener listener) |
void |
unRegisterLoginListener(ILoginStatusChangeListener listener)
移除全局登录状态监听
|
public void setSupportAliYun(boolean supportAliYun)
public void setDefaultOAHost(java.lang.String host)
public void setDefaultLoginParams(java.util.Map<java.lang.String,java.lang.String> loginParams)
public void setDefaultLoginClass(java.lang.Class<?> defaultLoginClass)
public void init(java.lang.String env)
ILoginAdapter
init
in interface ILoginAdapter
public void init(java.lang.String evn, java.lang.String suffix)
public void init(java.lang.String env, java.lang.String suffix, OALoginAdapter.OALoginAdapterInitResultCallback initResultCallback)
public void setIsDebuggable(boolean debuggable)
setIsDebuggable
in interface ILoginAdapter
public void refreshSession(boolean force, IRefreshSessionCallback sessionListener)
ILoginAdapter
refreshSession
in interface ILoginAdapter
force
- 是否需要强刷当前会话sessionListener
- 刷新Session监听回调接口 IRefreshSessionCallback
public void registerLoginListener(ILoginStatusChangeListener listener)
ILoginAdapter
registerLoginListener
in interface ILoginAdapter
listener
- 登录状态监听回调 ILoginStatusChangeListener
public void unRegisterLoginListener(ILoginStatusChangeListener listener)
ILoginAdapter
unRegisterLoginListener
in interface ILoginAdapter
listener
- 登录状态监听回调 ILoginStatusChangeListener
public void login(ILoginCallback callback)
ILoginAdapter
login
in interface ILoginAdapter
callback
- 登录结果回调public void login(ILoginCallback callback, java.util.Map<java.lang.String,java.lang.String> params)
public void showChangePwd(ILoginCallback callback)
public void logout(ILogoutCallback callback)
ILoginAdapter
logout
in interface ILoginAdapter
callback
- 登出结果回调public boolean isLogin()
ILoginAdapter
isLogin
in interface ILoginAdapter
public UserInfo getUserData()
ILoginAdapter
getUserData
in interface ILoginAdapter
UserInfo
public java.lang.Object getSessionData()
ILoginAdapter
getSessionData
in interface ILoginAdapter
public java.lang.String getSessionId()
ILoginAdapter
getSessionId
in interface ILoginAdapter
public void registerBeforeLogoutListener(OALoginAdapter.OnBeforeLogoutListener listener)
public void unRegisterBeforeLogoutListener(OALoginAdapter.OnBeforeLogoutListener listener)