public interface IWWClient
Modifier and Type | Interface and Description |
---|---|
static class |
IWWClient.ClientType |
Modifier and Type | Method and Description |
---|---|
void |
authenticate()
Attempt authentication of the WWClient
|
String |
getAppCredentials()
Converts appId and appSecret into required content for Authorization header
|
IWWClient.ClientType |
getClientType()
Getter for ClientType, dependent upon the initialiser user
|
Object |
getExpiresIn()
Gets the length of time until the token expires from the
AuthenticationResult |
String |
getJWTToken()
Gets JWT token for the user / application from the
AuthenticationResult . |
boolean |
isAuthenticated()
Whether or not authentication has successfully occurred.
|
boolean |
isValid()
Tests whether the
AuthenticationResult is valid |
IWWClient.ClientType getClientType()
IWWClient.ClientType.USER
or IWWClient.ClientType.APPLICATON
String getAppCredentials() throws UnsupportedEncodingException
UnsupportedEncodingException
- if the encoding option is not supportedboolean isAuthenticated()
authenticate()
firstvoid authenticate() throws UnsupportedEncodingException, WWException
UnsupportedEncodingException
- Authorization header could not be constructedWWException
- Some other error occurred during authenticationString getJWTToken()
AuthenticationResult
. The JWT token is an expiring token associated with the appId and appSecret. From the documentation: "This JWT
token is what you have to use in your App to pass to Watson Work Services on API calls so that you can use its services securely"Object getExpiresIn()
AuthenticationResult
boolean isValid()
AuthenticationResult
is validCopyright © 2017 OpenNTF. All rights reserved.