Discuss this help topic in SecureBlackbox Forum

OAuth: Register OAuth client

Before an OAuth2 server is started you should create and fill an instance of TElHTTPOAuth2MemoryApplicationStorage TElHTTPOAuth2MemoryApplicationStorage (or another TElHTTPOAuth2CustomApplicationStorage descendant class) and assign it to TElHTTPSServer.ApplicationInfoStorage property. The instance contains a list of registered OAuth2 (client) applications, which are allowed to work with your server.

OAuth2 clients are registered by adding TElHTTPOAuth2ApplicationInfo objects to TElHTTPOAuth2MemoryApplicationStorage instance or another TElHTTPOAuth2CustomApplicationStorage descendant. Each TElHTTPOAuth2ApplicationInfo object describes a client application.

The main properties of TElHTTPOAuth2ApplicationInfo are


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();

httpsServer.ApplicationInfoStorage = storage;

How To articles about server-side OAuth questions

Discuss this help topic in SecureBlackbox Forum