com.rt.storage.auth.oauth2.TokenStore Maven / Gradle / Ivy
package com.rt.storage.auth.oauth2;
import java.io.IOException;
/** Interface for long term storage of tokens */
public interface TokenStore {
/**
* Load the token data from storage for the given ID.
*
* @param id ID of token data to load.
* @return The loaded token data.
* @throws IOException An error loading the token data from storage.
*/
String load(String id) throws IOException;
/**
* Put the token data into storage for the given ID.
*
* @param id ID of token data to store.
* @param tokens The token data to store.
* @throws IOException An error storing the token data.
*/
void store(String id, String tokens) throws IOException;
/**
* Remove the token data from storage for the given ID.
*
* @param id ID of token data to store.
* @throws IOException An error storing the token data.
*/
void delete(String id) throws IOException;
}