public class AuthenticationResult extends Object
Constructor and Description |
---|
AuthenticationResult(String jwtToken,
int expires,
String displayName,
String userId,
String jtiId,
String refreshToken,
String scopeAsString,
Date created)
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
|
Date |
getExpireDate()
Gets the time the token will expire
|
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 |
getScopeAsString()
Get the scope for a user / application
|
String |
getUserId()
Gets user or application ID returned in authentication result
|
String |
getUserRefreshToken()
Gets refresh token for a user.
|
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, String refreshToken, String scopeAsString, Date created)
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 idrefreshToken
- String user's refresh tokenscopeAsString
- String return value for scopes for the user's accesscreated
- Date the UserToken was initially createdpublic String getJwtToken()
public int getExpires()
public Date getExpireDate()
public Date getCreated()
public String getDisplayName()
public String getUserId()
public String getJtId()
public String getUserRefreshToken()
public String getScopeAsString()
public boolean isValid()
public static AuthenticationResult buildFromToken(AppToken appToken)
appToken
- AppToken
object constructed from JSON returned by authentication processCopyright © 2018 OpenNTF. All rights reserved.