public void StringToRedirectUris()
 {
     foreach (var redirectUri in ToLists(RedirectUrisString))
     {
         RedirectUris.Add(redirectUri);
     }
 }
Example #2
0
 public virtual void AddRedirectUri([NotNull] string redirectUri)
 {
     RedirectUris.Add(new ClientRedirectUri()
     {
         ClientId    = Id,
         RedirectUri = redirectUri
     });
 }
Example #3
0
        public Task <IdentityServiceResult> RegisterLogoutRedirectUriAsync(TApplication app, string redirectUri, CancellationToken cancellationToken)
        {
            cancellationToken.ThrowIfCancellationRequested();
            ThrowIfDisposed();
            if (app == null)
            {
                throw new ArgumentNullException(nameof(app));
            }

            if (redirectUri == null)
            {
                throw new ArgumentNullException(nameof(redirectUri));
            }

            RedirectUris.Add(CreateRedirectUri(app, redirectUri, isLogout: true));

            return(Task.FromResult(IdentityServiceResult.Success));
        }
Example #4
0
        public void SetSigninRedirectUris(IEnumerable <string> redirectUris)
        {
            if (RedirectUris == null)
            {
                RedirectUris = new List <string>();
            }

            foreach (var uri in redirectUris)
            {
                if (uri.StartsWith("http://") || uri.StartsWith("https://"))
                {
                    // add the uri specifically as given
                    RedirectUris.Add(uri);
                }
                else
                {
                    // otherwise add for for both HTTP & HTTPS since we don't know which one
                    RedirectUris.Add($"http://{uri}");
                    RedirectUris.Add($"https://{uri}");
                }
            }
        }
Example #5
0
 public void AddRedirectUri([NotNull] string redirectUri)
 {
     RedirectUris.Add(new ClientRedirectUriDto(Id, redirectUri));
 }
Example #6
0
 public void AddEmptyRedirectUrl() => RedirectUris.Add(new SimpleValue <string>(String.Empty));