public class AuthenticationResult extends Object
Constructor and Description |
---|
AuthenticationResult(String jwtToken,
int expires,
String displayName,
String userId,
String jtiId)
Constructs AuthenticationResult from parameters.
|
Modifier and Type | Method and Description |
---|---|
static AuthenticationResult |
buildFromToken(AppToken appToken)
Builds an AuthenticationResult object from the AppToken object constructed from JSON returned by the authentication process
|
Date |
getCreated()
Gets date when the authentication result was created
|
String |
getDisplayName()
Gets the display name for the user, not currently in authentication result for applications
|
int |
getExpires()
Gets the length of time before the token will expire
|
String |
getJtId()
Gets JTI id returned in authentication result
|
String |
getJwtToken()
Gets the JWT token returned in authentication result
|
String |
getUserId()
Gets user or application ID returned in authentication result
|
boolean |
isValid()
Test JDT token expiry time against current time and return whether or not it's still valid.
|
public AuthenticationResult(String jwtToken, int expires, String displayName, String userId, String jtiId)
buildFromToken(AppToken)
jwtToken
- String JWT token for future requestsexpires
- int, length of time until expirydisplayName
- String, display name for user or blank for applicationsuserId
- String, user idjtiId
- String, JTI idpublic String getJwtToken()
public int getExpires()
public Date getCreated()
public String getDisplayName()
public String getUserId()
public String getJtId()
public boolean isValid()
public static AuthenticationResult buildFromToken(AppToken appToken)
appToken
- AppToken
object constructed from JSON returned by authentication processCopyright © 2017 OpenNTF. All rights reserved.