Discuss this help topic in SecureBlackbox Forum
OAuth: Register OAuth client
Essential step to set up OAuth 2.0 server is to register the applications which will work with the server. TElHTTPSServer uses an application storage object for application bookkeeping. Common interface for application storages is defined by TElHTTPOAuth2CustomApplicationStorage class. Before the OAuth server is started, create and fill an instance of TElHTTPOAuth2MemoryApplicationStorage, and assign it to the server's ApplicationInfoStorage property. You can develop your own descendant of TElHTTPOAuth2CustomApplicationStorage supporting other storage mechanisms such as database or file system.
Each client application in the storage is represented by a TElHTTPOAuth2ApplicationInfo object. Create a new object for each new application, and add it to your TElHTTPOAuth2MemoryApplicationStorage instance.
For each application, it is essential to fill the following properties of TElHTTPOAuth2ApplicationInfo:
C#:
TElHTTPOAuth2ApplicationInfo info = new TElHTTPOAuth2ApplicationInfo();
info.Name = "Application name";
info.ClientID = "client_1234567890";
info.ClientSecret = "random_secret_string";
info.RedirectURI = "http://redirect.org/redirect_page";
info.Scopes.Add("photo=Photo scope");
info.Scopes.Add("calendar=Calendar scope");
TElHTTPOAuth2MemoryApplicationStorage storage = new TElHTTPOAuth2MemoryApplicationStorage();
storage.Add(info);
httpsServer.ApplicationInfoStorage = storage;