Documentation ¶
Overview ¶
Subpackage to provide interface for zboxapi SDK (dealing with apps backend) to be used to build the mobile SDK.
Index ¶
- Variables
- func CreateJwtSession(userID string) (int64, error)
- func CreateJwtToken(userID string, jwtSessionID int64) (string, error)
- func GetCsrfToken() (string, error)
- func Init(baseUrl, appType string)
- func RefreshJwtToken(userID string, token string) (string, error)
- func SetWallet(clientID, clientPrivateKey, clientPublicKey string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrZboxApiNotInitialized = errors.New("zboxapi: zboxapi client is not initialized") ErrZboxApiInvalidWallet = errors.New("zboxapi: invalid wallet") )
Functions ¶
func CreateJwtSession ¶
CreateJwtSession create a jwt session for the given phone number
- phoneNumber is the phone number
func CreateJwtToken ¶
CreateJwtToken create a fresh jwt token for the given user id
- phoneNumber is the phone number
- jwtSessionID is the jwt session id
- otp is the one time password
func Init ¶
func Init(baseUrl, appType string)
Init initialize the zbox api client for the mobile sdk
- baseUrl is the base url of the server
- appType is the type of the application
func RefreshJwtToken ¶
RefreshJwtToken refresh jwt token
- phoneNumber is the phone number for which the token is to be refreshed
- token is the token to be refreshed
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.