Package org.dspace.external
Class OpenAIRERestToken
- java.lang.Object
-
- org.dspace.external.OpenAIRERestToken
-
public class OpenAIRERestToken extends Object
OpenAIRE rest API token to be used when grabbing an accessToken.
Based on https://develop.openaire.eu/basic.html- Author:
- paulo-graca
-
-
Constructor Summary
Constructors Constructor Description OpenAIRERestToken(String accessToken, Long expiresIn)Stores the grabbed token
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetToken()Returns the storedbooleanisValidToken()If the existing token has an expiration date and if it is at a minute of expiring
-
-
-
Method Detail
-
getToken
public String getToken()
Returns the stored- Returns:
- String with the stored token
-
isValidToken
public boolean isValidToken()
If the existing token has an expiration date and if it is at a minute of expiring- Returns:
-
-