public class AuthService extends Object
Modifier and Type | Field and Description |
---|---|
private Credentials |
credentials |
private Transport |
transport |
private URL |
url |
Constructor and Description |
---|
AuthService() |
AuthService(URL url,
Credentials credentials,
Transport transport) |
Modifier and Type | Method and Description |
---|---|
UserInfo |
getUserInfo()
Get user info.
|
HandshakeReply |
handshake()
This method is very useful to check authentication.
|
private URL url
private Credentials credentials
private Transport transport
public AuthService()
public AuthService(URL url, Credentials credentials, Transport transport)
public HandshakeReply handshake()
SellerNotFoundJsonException
- if there is credentials and seller with given country and corporate id is not
registered. If caught, you should register yourself on the server return HandshakeReply
indicates whether request version is outdated.AuthServiceSample
public UserInfo getUserInfo()
UserInfo
ForbiddenJsonException
- if trying to get user info, while the authentication is by seller role or by activation
role.AuthServiceSample
Copyright © 2015. All rights reserved.