SSO or Single Sign On for use with a dedicated control panel has been created, so it will allow customers/users to access the company website, where they can perform standard tasks like create/delete/modify users/groups and shares for a specific company.


The page that the user will be logged into can look like this:




Variables


To login to the company configurator with SSO, you will need to call the LoginAps.aspx page with the following variables in the URL:


    • APS - should always be set to 1

    • id - The External ID of the company which you wish to login as

    • token - the External Password of the company which you wish to login as 

    (Note: Remember to URL encode token, because it will contain illegal characters for URL)

    • resellerid - the id of the reseller which the company is located under


With redirect to the new webinterface:

    • redirect - just has to be set to any value like 1 or true

    • companyID - the id of the company which you wish to login as


These fields are highlighted in the Company class below in Classes.

(Note: all variables in the URL are case sensitive so it has to be exact matches)



Examples:


Direct

Direct via the browser address line:


https://company.rushfiles.com/LoginAps.aspx?APS=1&id=4a5f2571-fc60-426e-8c82-29a1565e21aa&resellerid=9456d901-e648-494a-b59a-98b4bd9ec21c&token=QVjTgOuycIklea87PUl9R3K%2fXUw9F84CLym9LfcoZxpdwwXqhl1dXuqsxr9TaGGXO
Bckeh7kFJfwrTZwxS9tdL2bZ0IKjk5HpKC28uaM6TwsEaVfscKOpo0gicRkaJO7vQjgjVM%2bkyPwjhza4kcrS1QteuVQeEk0Pk%2fhkLacnuNLqIgoIPZrGyWrejeftT57Pjif3EfaYnXf8xXyLWb0gwWr%2f3kQo87OuM3w%2b5BOtkk%3d


If it should redirect to the new interface, add the parameters redirect=1 and also companyID=<CompanyId>:


https://company.rushfiles.com/LoginAps.aspx?APS=1&redirect=1&companyID=4678ea65-4d80-4276-a567-ea13fb84da25

&id=4a5f2571-fc60-426e-8c82-29a1565e21aa&resellerid=9456d901-e648-494a-b59a-98b4bd9ec21c

&token=QVjTgOuycIklea87PUl9R3K%2fXUw9F84CLym9LfcoZxpdwwXqhl1dXuqsxr9TaGGXOBckeh7kFJfwrTZw

xS9tdL2bZ0IKjk5HpKC28uaM6TwsEaVfscKOpo0gicRkaJO7vQjgjVM%2bkyPwjhza4kcrS1QteuVQeEk0Pk%2fhkL

acnuNLqIgoIPZrGyWrejeftT57Pjif3EfaYnXf8xXyLWb0gwWr%2f3kQo87OuM3w%2b5BOtkk%3d


(Note: these are fictive values and do not work!)


You should then be redirected with a logged in user.


HTML

Create a link on your control panel with the URL embedded into the html code:


<a href="https://Company.rushfiles.com/LoginAps.aspx?APS=1&id=4a5f2571-fc60-426e-8c82-29a1565e21aa&resellerid=9456d901-e648-494a-b59a-98b4bd9ec21c&token=QVjTgOuycIklea87PUl9R3K%2fXUw9F84CLym9LfcoZxpdwwXqhl1dXuqsxr9TaGGXOBckeh7kFJfwrTZwxS9tdL2bZ0IKjk5HpKC28uaM6TwsEaVfscKOpo0gicRkaJO7vQjgjVM%2bkyPwjhza4kcrS1QteuVQeEk0Pk%2fhkLacnuNLqIgoIPZrGyWrejeftT57Pjif3EfaYnXf8xXyLWb0gwWr%2f3kQo87OuM3w%2b5BOtkk%3d"
target="_blank">Open Company On Another Tab</a>'


With redirect:


<a href="https://Company.rushfiles.com/LoginAps.aspx?APS=1&redirect=1&companyID=4678ea65-4d80-4276-a567-ea13fb84da25

&id=4a5f2571-fc60-426e-8c82-29a1565e21aa&resellerid=9456d901-e648-494a-b59a-98b4bd9ec21c

&token=QVjTgOuycIklea87PUl9R3K%2fXUw9F84CLym9LfcoZxpdwwXqhl1dXuqsxr9TaGGXOBckeh7kFJfwrTZw

xS9tdL2bZ0IKjk5HpKC28uaM6TwsEaVfscKOpo0gicRkaJO7vQjgjVM%2bkyPwjhza4kcrS1QteuVQeEk0Pk%2fhkL

acnuNLqIgoIPZrGyWrejeftT57Pjif3EfaYnXf8xXyLWb0gwWr%2f3kQo87OuM3w%2b5BOtkk%3d

target="_blank">Open Company On Another Tab</a>




C#

Company company = GetCompany(); //The company which you are trying to login to.

 string
 domain = "rushfiles.com";

string token = System.Web.HttpUtility.UrlEncode(company.ExternalPassword);

 string
 webRequest = string.Format(
"https://companyconfigurator.{0}/LoginAps.aspx?APS=1&id={1}&resellerid={2}&token={3}",
  domain, 
//{0} The domain of the companyapi - in this case rushfiles.com

 company.ExternalId, //{1} The id variable - which is the ExternalId of the company

 company.ResellerId, //{2} The resellerid variable - which is the ResellerId of the company

 token //{3} The token variable - which is the ExternalPassword of the company
        //(Important that this variable is urlencoded!) 

);

 

//This can then be used to open a new browser or iframed with the webRequest as URL.



Classes

public class Company 

 {

 [BsonId]

 public string CompanyId { getset; }

 public string ExternalId { getset; }

 public string ExternalPassword { getset; }

 public string ResellerId { getset; }

 public string Name { getset; }

 public string Max_Space { getset; } //In MB

 publCCic string Max_Users { getset; }

 public string Space_inUse { getset; } //In MB

 public string History_Space { getset; }

 public string Users_inUse { getset; }

 public MetaData MetaData { getset; }

 public CompanyStatus Status { getset; }

 public long CreateTime { getset; }

 public string CreatedBy { getset; }

 public long UpdateTime { getset; }

 public string UpdatedBy { getset; }

 public long DeleteTime { getset; }

 public string DeletedBy { getset; }

 public string ArchiveHostingUrl { getset; }

 public string ArchiveLocalUrl { getset; }

 public HistoryCriterias HistoryCriterias { getset; }

 public HistoryCriterias ResellerHistoryCriterias { getset; }

 public bool IsCriteriasFrozen { getset; }

 }