public class FileAuthenticationStore extends Object implements AuthenticationStore
| Constructor and Description |
|---|
FileAuthenticationStore(File store)
Creates a new file-based authentication store
|
| Modifier and Type | Method and Description |
|---|---|
String |
getSecret() |
String |
getToken() |
void |
reset()
Resets the contents of this authentication store
|
void |
save(String token,
String secret)
Stores a new access token
|
public FileAuthenticationStore(File store) throws IOException
store - the file to use as authentication storeIOException - the the given file could not be readpublic String getToken()
getToken in interface AuthenticationStorepublic String getSecret()
getSecret in interface AuthenticationStorepublic void save(String token, String secret) throws IOException
AuthenticationStoresave in interface AuthenticationStoretoken - the token's value (must not be null)secret - the token's secret (must not be null)IOException - if the values could not storedpublic void reset()
throws IOException
AuthenticationStorereset in interface AuthenticationStoreIOException - if the store could not be reset