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 task like create/delete/modify users/groups 

and shares for a specific company. The page that the user will be logged in 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 are 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 hte company which you wis 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%2fh
kLacnuNLqIgoIPZrGyWrejeftT57Pjif3EfaYnXf8xXyLWb0gwWr%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 you control panel with the URL imbedded 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%2fXUw9F84CLym9LfcoZxpdwwXqhl
1dXuqsxr9TaGGXOBckeh7kFJfwrTZwxS9tdL2bZ0IKjk5HpKC28uaM6TwsEaVfscKOpo0gicRkaJO7vQjgjVM%2bkyPwjhza4kcr
S1QteuVQeEk0Pk%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 { get; set; }

 public string ExternalId { get; set; }

 public string ExternalPassword { get; set; }

 public string ResellerId { get; set; }

 public string Name { get; set; }

 public string Max_Space { get; set; } //In MB

 publCCic string Max_Users { get; set; }

 public string Space_inUse { get; set; } //In MB

 public string History_Space { get; set; }

 public string Users_inUse { get; set; }

 public MetaData MetaData { get; set; }

 public CompanyStatus Status { get; set; }

 public long CreateTime { get; set; }

 public string CreatedBy { get; set; }

 public long UpdateTime { get; set; }

 public string UpdatedBy { get; set; }

 public long DeleteTime { get; set; }

 public string DeletedBy { get; set; }

 public string ArchiveHostingUrl { get; set; }

 public string ArchiveLocalUrl { get; set; }

 public HistoryCriterias HistoryCriterias { get; set; }

 public HistoryCriterias ResellerHistoryCriterias { get; set; }

 public bool IsCriteriasFrozen { get; set; }

 }