Esempio n. 1
0
        public async Task SetDefaultPlatformDataClaim(Guid externalId, PlatformDataClaim platformDataClaim, IAsyncDocumentSession session,
                                                      CancellationToken cancellationToken)
        {
            var app = await GetAppFromApplicationId(externalId, session, cancellationToken);

            app.DefaultPlatformDataClaim = platformDataClaim;
        }
 public AppViewModel(string applicationId, string name, string description, string logoUrl, string websiteUrl,
                     string authorizationCallbackUrl, PlatformDataClaim defaultPlatformDataClaim)
 {
     ApplicationId            = applicationId;
     Name                     = name;
     Description              = description;
     LogoUrl                  = logoUrl;
     WebsiteUrl               = websiteUrl;
     AuthorizationCallbackUrl = authorizationCallbackUrl;
     DefaultPlatformDataClaim = defaultPlatformDataClaim;
 }
 public AppInfoViewModel(string name, string dataUpdateCallbackUrl,
                         string authorizationCallbackUrl, string secretKey,
                         string applicationId, string websiteUrl, PlatformDataClaim defaultPlatformDataClaim)
 {
     Name = name;
     DataUpdateCallbackUrl    = dataUpdateCallbackUrl;
     AuthorizationCallbackUrl = authorizationCallbackUrl;
     SecretKey                = secretKey;
     ApplicationId            = applicationId;
     WebsiteUrl               = websiteUrl;
     DefaultPlatformDataClaim = defaultPlatformDataClaim;
 }
Esempio n. 4
0
 public App(string name, Guid externalId, string secretKey, string dataUpdateCallbackUrl,
            string authorizationCallbackUrl, string description, string logoUrl, string websiteUrl, PlatformDataClaim defaultPlatformDataClaim,
            bool isInactive = false) : this()
 {
     Name                     = name;
     ExternalId               = externalId;
     SecretKey                = secretKey;
     DataUpdateCallbackUrl    = dataUpdateCallbackUrl;
     AuthorizationCallbackUrl = authorizationCallbackUrl;
     Description              = description;
     LogoUrl                  = logoUrl;
     WebsiteUrl               = websiteUrl;
     DefaultPlatformDataClaim = defaultPlatformDataClaim;
     IsInactive               = isInactive;
 }
Esempio n. 5
0
        public async Task <App> CreateApp(string name, string dataUpdateCallbackUrl,
                                          string authorizationCallbackUrl,
                                          string description, string logoUrl, string websiteUrl, PlatformDataClaim platformDataClaim,
                                          IAsyncDocumentSession session, bool isInactive = false,
                                          CancellationToken cancellationToken            = default)
        {
            dataUpdateCallbackUrl    = string.IsNullOrWhiteSpace(dataUpdateCallbackUrl) ? null : dataUpdateCallbackUrl;
            authorizationCallbackUrl = string.IsNullOrWhiteSpace(authorizationCallbackUrl)
                ? null
                : authorizationCallbackUrl;

            var app = new App(name, Guid.NewGuid(), Guid.NewGuid().ToString(), dataUpdateCallbackUrl,
                              authorizationCallbackUrl, description, logoUrl, websiteUrl, platformDataClaim, isInactive);
            await session.StoreAsync(app, cancellationToken);

            return(app);
        }
Esempio n. 6
0
 public NotificationInfo(string appId, PlatformDataClaim platformDataClaim) : this()
 {
     AppId             = appId;
     PlatformDataClaim = platformDataClaim;
 }