Authlete
AuthletePropertiesConfiguration Class Reference

An implementation of the IAuthleteConfiguration interface that refers to a properties file whose content complies with the format defined in the JavaDoc of java.util.Properties.load(java.io.Reader). More...

Inheritance diagram for AuthletePropertiesConfiguration:
IAuthleteConfiguration

Public Member Functions

 AuthletePropertiesConfiguration ()
 The default constructor. This constructor tries to read a configuration file. If the environment variable, AUTHLETE_CONFIGURATION_FILE, is defined and holds a non-null value, the value is used as the name of the configuration file. Otherwise (= if the environment variable is not defined or its value is empty), this constructor tries to read a file named "authlete.properties". More...
 
 AuthletePropertiesConfiguration (string file)
 Constructor with the name of a configuration file. More...
 
 AuthletePropertiesConfiguration (TextReader reader)
 Constructor with the stream of a configuration file. More...
 

Static Public Attributes

const string DEFAULT_FILE = "authlete.properties"
 The default value of the name of the configuration file ("authlete.properties"). More...
 
const string ENV_CONFIG_FILE = "AUTHLETE_CONFIGURATION_FILE"
 The name of the environment variable to specify the configuration file. More...
 

Properties

string BaseUrl [get]
 
string ServiceOwnerApiKey [get]
 
string ServiceOwnerApiSecret [get]
 
string ServiceOwnerAccessToken [get]
 
string ServiceApiKey [get]
 
string ServiceApiSecret [get]
 
string ServiceAccessToken [get]
 
- Properties inherited from IAuthleteConfiguration
string BaseUrl [get]
 The base URL of an Authlete server. More...
 
string ServiceOwnerApiKey [get]
 The API key of a service owner. More...
 
string ServiceOwnerApiSecret [get]
 The API secret of a service owner. More...
 
string ServiceOwnerAccessToken [get]
 The access token for service owner APIs. More...
 
string ServiceApiKey [get]
 The API key of a service. More...
 
string ServiceApiSecret [get]
 Gets the service API secret. More...
 
string ServiceAccessToken [get]
 The access token for service APIs. More...
 

Detailed Description

An implementation of the IAuthleteConfiguration interface that refers to a properties file whose content complies with the format defined in the JavaDoc of java.util.Properties.load(java.io.Reader).

This is a utility class to load a configuration file that includes properties related to Authlete. Below is the list of configuration properties.

  • base_url The base URL of an Authlete server. The default value is https://api.authlete.com.

  • service_owner.api_key The API key of a service owner.

  • service_owner.api_secret The API secret of a service owner.

  • service_owner.access_token The access token for service owner APIs.

  • service.api_key The API key of a service.

  • service.api_secret The API secret of a service.

  • service.access_token The access token for service APIs.

Constructor & Destructor Documentation

◆ AuthletePropertiesConfiguration() [1/3]

The default constructor. This constructor tries to read a configuration file. If the environment variable, AUTHLETE_CONFIGURATION_FILE, is defined and holds a non-null value, the value is used as the name of the configuration file. Otherwise (= if the environment variable is not defined or its value is empty), this constructor tries to read a file named "authlete.properties".

◆ AuthletePropertiesConfiguration() [2/3]

AuthletePropertiesConfiguration ( string  file)
inline

Constructor with the name of a configuration file.

Parameters
fileThe name of a configuration file.

◆ AuthletePropertiesConfiguration() [3/3]

AuthletePropertiesConfiguration ( TextReader  reader)
inline

Constructor with the stream of a configuration file.

Parameters
readerThe stream of a configuration file.

Member Data Documentation

◆ DEFAULT_FILE

const string DEFAULT_FILE = "authlete.properties"
static

The default value of the name of the configuration file ("authlete.properties").

◆ ENV_CONFIG_FILE

const string ENV_CONFIG_FILE = "AUTHLETE_CONFIGURATION_FILE"
static

The name of the environment variable to specify the configuration file.


The documentation for this class was generated from the following file: