类 AccessToken
- java.lang.Object
-
- org.elastos.hive.connection.auth.AccessToken
-
- 所有已实现的接口:
CodeFetcher
public class AccessToken extends java.lang.Object implements CodeFetcher
The access token is made by hive node and represents the user DID and the application DID.Some of the node APIs requires access token when handling request.
-
-
构造器概要
构造器 构造器 说明 AccessToken(ServiceEndpoint endpoint, DataStorage storage, BridgeHandler bridge)Create the access token by service end point, data storage, and bridge handler.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 java.lang.Stringfetch()Fetch the code.voidinvalidate()Invalidate the code for getting the code from remote server.
-
-
-
构造器详细资料
-
AccessToken
public AccessToken(ServiceEndpoint endpoint, DataStorage storage, BridgeHandler bridge)
Create the access token by service end point, data storage, and bridge handler.- 参数:
endpoint- The service end point.storage- The data storage which is used to save the access token.bridge- The bridge handle is used for caller to do sth when getting the access token.
-
-
方法详细资料
-
fetch
public java.lang.String fetch() throws NodeRPCException从接口复制的说明:CodeFetcherFetch the code.- 指定者:
fetch在接口中CodeFetcher- 返回:
- The code, MUST not be null.
- 抛出:
NodeRPCException- The exception shows the error returned by hive node.
-
invalidate
public void invalidate()
从接口复制的说明:CodeFetcherInvalidate the code for getting the code from remote server.- 指定者:
invalidate在接口中CodeFetcher
-
-