Example #1
0
        /// <summary>
        /// Finds all  Registered Application data with access Token Redirect U R I containing specified keyword
        /// </summary>
        /// <param name="accessTokenRedirectURI"> Access Token Redirect U R I</param>
        /// <returns>List of  Registered Application</returns>
        public List <RegisteredApplication> FindByAccessTokenRedirectURI(string accessTokenRedirectURI)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.RegisteredApplications
                       where
                       o.AccessTokenRedirectURI.Contains(accessTokenRedirectURI)
                       select o;

            return(list.ToList());
        }
Example #2
0
        /// <summary>
        /// Finds all  Access Token data with refresh Token containing specified keyword
        /// </summary>
        /// <param name="refreshToken"> Refresh Token</param>
        /// <returns>List of  Access Token</returns>
        public List <AccessToken> FindByRefreshToken(string refreshToken)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.AccessTokens
                       where
                       o.RefreshToken.Contains(refreshToken)
                       select o;

            return(list.ToList());
        }
Example #3
0
        /// <summary>
        /// Finds all  Access Token data with client Secret containing specified keyword
        /// </summary>
        /// <param name="clientSecret"> Client Secret</param>
        /// <returns>List of  Access Token</returns>
        public List <AccessToken> FindByClientSecret(string clientSecret)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.AccessTokens
                       where
                       o.ClientSecret.Contains(clientSecret)
                       select o;

            return(list.ToList());
        }
Example #4
0
//------------------- Find by keywords --------------------------------------------------------

        /// <summary>
        /// Finds all  Access Token data with access Token String containing specified keyword
        /// </summary>
        /// <param name="accessTokenString"> Access Token String</param>
        /// <returns>List of  Access Token</returns>
        public List <AccessToken> FindByAccessTokenString(string accessTokenString)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.AccessTokens
                       where
                       o.AccessTokenString.Contains(accessTokenString)
                       select o;

            return(list.ToList());
        }
//------------------- Find by keywords --------------------------------------------------------

        /// <summary>
        /// Finds all  Authentication Session data with authentication Session String containing specified keyword
        /// </summary>
        /// <param name="authenticationSessionString"> Authentication Session String</param>
        /// <returns>List of  Authentication Session</returns>
        public List <AuthenticationSession> FindByAuthenticationSessionString(string authenticationSessionString)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.AuthenticationSessions
                       where
                       o.AuthenticationSessionString.Contains(authenticationSessionString)
                       select o;

            return(list.ToList());
        }
        /// <summary>
        /// Finds all  O Auth Setting data with setting Value containing specified keyword
        /// </summary>
        /// <param name="settingValue"> Setting Value</param>
        /// <returns>List of  O Auth Setting</returns>
        public List <OAuthSetting> FindBySettingValue(string settingValue)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.OAuthSettings
                       where
                       o.SettingValue.Contains(settingValue)
                       select o;

            return(list.ToList());
        }
Example #7
0
        /// <summary>
        /// Finds all  Registered Application data with authentication Url containing specified keyword
        /// </summary>
        /// <param name="authenticationUrl"> Authentication Url</param>
        /// <returns>List of  Registered Application</returns>
        public List <RegisteredApplication> FindByAuthenticationUrl(string authenticationUrl)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.RegisteredApplications
                       where
                       o.AuthenticationUrl.Contains(authenticationUrl)
                       select o;

            return(list.ToList());
        }
Example #8
0
        /// <summary>
        /// Finds all  Registered Application data with client Secret containing specified keyword
        /// </summary>
        /// <param name="clientSecret"> Client Secret</param>
        /// <returns>List of  Registered Application</returns>
        public List <RegisteredApplication> FindByClientSecret(string clientSecret)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.RegisteredApplications
                       where
                       o.ClientSecret.Contains(clientSecret)
                       select o;

            return(list.ToList());
        }
        /// <summary>
        /// Finds all  Authentication Code data with client I D containing specified keyword
        /// </summary>
        /// <param name="clientID"> Client I D</param>
        /// <returns>List of  Authentication Code</returns>
        public List <AuthenticationCode> FindByClientID(string clientID)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.AuthenticationCodes
                       where
                       o.ClientID.Contains(clientID)
                       select o;

            return(list.ToList());
        }
Example #10
0
//-----------------------  Find by Foreign keys ---------------------------------------

        /// <summary>
        /// Finds all  Registered Application data with specified authentication Source Id
        /// </summary>
        /// <param name="authenticationSourceId"> Authentication Source Id</param>
        /// <returns>List of  Registered Application</returns>
        public List <RegisteredApplication> FindByAuthenticationSourceId(Int16 authenticationSourceId)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.RegisteredApplications
                       where
                       o.AuthenticationSourceId == authenticationSourceId
                       select o;

            return(list.ToList());
        }
        /// <summary>
        /// Finds all  Authentication Code data with authorization Session I D containing specified keyword
        /// </summary>
        /// <param name="authorizationSessionID"> Authorization Session I D</param>
        /// <returns>List of  Authentication Code</returns>
        public List <AuthenticationCode> FindByAuthorizationSessionID(string authorizationSessionID)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.AuthenticationCodes
                       where
                       o.AuthorizationSessionID.Contains(authorizationSessionID)
                       select o;

            return(list.ToList());
        }
        /// <summary>
        /// Finds all  Authentication Source data with authentication Classname containing specified keyword
        /// </summary>
        /// <param name="authenticationClassname"> Authentication Classname</param>
        /// <returns>List of  Authentication Source</returns>
        public List <AuthenticationSource> FindByAuthenticationClassname(string authenticationClassname)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.AuthenticationSources
                       where
                       o.AuthenticationClassname.Contains(authenticationClassname)
                       select o;

            return(list.ToList());
        }
        /// <summary>
        /// Finds all  Refresh Token data with authentication Code containing specified keyword
        /// </summary>
        /// <param name="authenticationCode"> Authentication Code</param>
        /// <returns>List of  Refresh Token</returns>
        public List <RefreshToken> FindByAuthenticationCode(string authenticationCode)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.RefreshTokens
                       where
                       o.AuthenticationCode.Contains(authenticationCode)
                       select o;

            return(list.ToList());
        }
Example #14
0
        /// <summary>
        /// Finds all  Registered Application data with application Desc containing specified keyword
        /// </summary>
        /// <param name="applicationDesc"> Application Desc</param>
        /// <returns>List of  Registered Application</returns>
        public List <RegisteredApplication> FindByApplicationDesc(string applicationDesc)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.RegisteredApplications
                       where
                       o.ApplicationDesc.Contains(applicationDesc)
                       select o;

            return(list.ToList());
        }
Example #15
0
        /// <summary>
        /// Finds all  Registered Application data with specified is Active
        /// </summary>
        /// <param name="isActive"> Is Active</param>
        /// <returns>List of  Registered Application</returns>
        public List <RegisteredApplication> FindByIsActive(Int16 isActive)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.RegisteredApplications
                       where
                       o.IsActive == isActive
                       select o;

            return(list.ToList());
        }
//------------------- Find by keywords --------------------------------------------------------

        /// <summary>
        /// Finds all  Refresh Token data with client I D containing specified keyword
        /// </summary>
        /// <param name="clientID"> Client I D</param>
        /// <returns>List of  Refresh Token</returns>
        public List <RefreshToken> FindByClientID(string clientID)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.RefreshTokens
                       where
                       o.ClientID.Contains(clientID)
                       select o;

            return(list.ToList());
        }
Example #17
0
//------------------- Delete by keywords --------------------------------------------------------

        /// <summary>
        /// Delete all  Access Token data with access Token String containing specified keyword
        /// </summary>
        /// <param name="accessTokenString"> Access Token String</param>
        /// <returns>List of  Access Token</returns>
        public void DeleteByAccessTokenString(string accessTokenString)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.AccessTokens
                       where
                       o.AccessTokenString.Contains(accessTokenString)
                       select o;

            dataContext.AccessTokens.RemoveRange(list);
            dataContext.SaveChanges();
        }
Example #18
0
        /// <summary>
        /// Delete all  Access Token data with expired Date containing specified keyword
        /// </summary>
        /// <param name="expiredDate"> Expired Date</param>
        /// <returns>List of  Access Token</returns>
        public void DeleteByExpiredDate(DateTime expiredDate)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.AccessTokens
                       where
                       o.ExpiredDate.Equals(expiredDate)
                       select o;

            dataContext.AccessTokens.RemoveRange(list);
            dataContext.SaveChanges();
        }
        /// <summary>
        /// Delete all  Registered Application data with client I D containing specified keyword
        /// </summary>
        /// <param name="clientID"> Client I D</param>
        /// <returns>List of  Registered Application</returns>
        public void DeleteByClientID(string clientID)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.RegisteredApplications
                       where
                       o.ClientID.Contains(clientID)
                       select o;

            dataContext.RegisteredApplications.RemoveRange(list);
            dataContext.SaveChanges();
        }
        /// <summary>
        /// Delete all  Registered Application data with application Desc containing specified keyword
        /// </summary>
        /// <param name="applicationDesc"> Application Desc</param>
        /// <returns>List of  Registered Application</returns>
        public void DeleteByApplicationDesc(string applicationDesc)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.RegisteredApplications
                       where
                       o.ApplicationDesc.Contains(applicationDesc)
                       select o;

            dataContext.RegisteredApplications.RemoveRange(list);
            dataContext.SaveChanges();
        }
        /// <summary>
        /// Delete all  Registered Application data with specified is Active
        /// </summary>
        /// <param name="isActive"> Is Active</param>
        /// <returns>List of  Registered Application</returns>
        public void DeleteByIsActive(Int16 isActive)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.RegisteredApplications
                       where
                       o.IsActive == isActive
                       select o;

            dataContext.RegisteredApplications.RemoveRange(list);
            dataContext.SaveChanges();
        }
        /// <summary>
        /// Delete all  Registered Application data with authentication Url containing specified keyword
        /// </summary>
        /// <param name="authenticationUrl"> Authentication Url</param>
        /// <returns>List of  Registered Application</returns>
        public void DeleteByAuthenticationUrl(string authenticationUrl)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.RegisteredApplications
                       where
                       o.AuthenticationUrl.Contains(authenticationUrl)
                       select o;

            dataContext.RegisteredApplications.RemoveRange(list);
            dataContext.SaveChanges();
        }
Example #23
0
        /// <summary>
        /// Finds all  Registered Application data with specified authentication Source Id, is Active
        /// </summary>
        /// <param name="authenticationSourceId"> Authentication Source Id</param>
        /// <param name="isActive"> Is Active</param>
        /// <returns>List of  Registered Application</returns>
        public List <RegisteredApplication> FindByAuthenticationSourceIdAndIsActive(Int16 authenticationSourceId, Int16 isActive)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.RegisteredApplications
                       where
                       o.AuthenticationSourceId == authenticationSourceId &&
                       o.IsActive == isActive
                       select o;

            return(list.ToList());
        }
Example #24
0
        /// <summary>
        /// Delete all  Access Token data with refresh Token containing specified keyword
        /// </summary>
        /// <param name="refreshToken"> Refresh Token</param>
        /// <returns>List of  Access Token</returns>
        public void DeleteByRefreshToken(string refreshToken)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.AccessTokens
                       where
                       o.RefreshToken.Contains(refreshToken)
                       select o;

            dataContext.AccessTokens.RemoveRange(list);
            dataContext.SaveChanges();
        }
Example #25
0
        /// <summary>
        /// Delete all  Access Token data with client Secret containing specified keyword
        /// </summary>
        /// <param name="clientSecret"> Client Secret</param>
        /// <returns>List of  Access Token</returns>
        public void DeleteByClientSecret(string clientSecret)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.AccessTokens
                       where
                       o.ClientSecret.Contains(clientSecret)
                       select o;

            dataContext.AccessTokens.RemoveRange(list);
            dataContext.SaveChanges();
        }
        /// <summary>
        /// Delete all  Registered Application data with created Date containing specified keyword
        /// </summary>
        /// <param name="createdDate"> Created Date</param>
        /// <returns>List of  Registered Application</returns>
        public void DeleteByCreatedDate(DateTime createdDate)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.RegisteredApplications
                       where
                       o.CreatedDate.Equals(createdDate)
                       select o;

            dataContext.RegisteredApplications.RemoveRange(list);
            dataContext.SaveChanges();
        }
//-----------------------  Delete by Foreign keys ---------------------------------------

        /// <summary>
        /// Delete all  Registered Application data with specified authentication Source Id
        /// </summary>
        /// <param name="authenticationSourceId"> Authentication Source Id</param>
        /// <returns>List of  Registered Application</returns>
        public void DeleteByAuthenticationSourceId(Int16 authenticationSourceId)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.RegisteredApplications
                       where
                       o.AuthenticationSourceId == authenticationSourceId
                       select o;

            dataContext.RegisteredApplications.RemoveRange(list);
            dataContext.SaveChanges();
        }
Example #28
0
//----------------------  find by dates -----------------------------------------------

        /// <summary>
        /// Finds all  Registered Application with CreatedDate between CreatedDate1 and CreatedDate2
        /// </summary>
        /// <param name="createdDate1"> Created Date</param>
        /// <param name="createdDate2"> Created Date</param>
        /// <returns>List of  Registered Application</returns>
        public List <RegisteredApplication> FindByCreatedDateBetween(DateTime createdDate1, DateTime createdDate2)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.RegisteredApplications
                       where
                       o.CreatedDate >= createdDate1 &&
                       o.CreatedDate <= createdDate2
                       select o;

            return(list.ToList());
        }
//----------------------  find by dates -----------------------------------------------

        /// <summary>
        /// Finds all  Authentication Code with CreatedDate between CreatedDate1 and CreatedDate2
        /// </summary>
        /// <param name="createdDate1"> Created Date</param>
        /// <param name="createdDate2"> Created Date</param>
        /// <returns>List of  Authentication Code</returns>
        public List <AuthenticationCode> FindByCreatedDateBetween(DateTime createdDate1, DateTime createdDate2)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.AuthenticationCodes
                       where
                       o.CreatedDate >= createdDate1 &&
                       o.CreatedDate <= createdDate2
                       select o;

            return(list.ToList());
        }
        /// <summary>
        /// Delete all  Registered Application data with access Token Redirect U R I containing specified keyword
        /// </summary>
        /// <param name="accessTokenRedirectURI"> Access Token Redirect U R I</param>
        /// <returns>List of  Registered Application</returns>
        public void DeleteByAccessTokenRedirectURI(string accessTokenRedirectURI)
        {
            ToolsDataContext dataContext = (ToolsDataContext)this.DataContext;
            var list = from o in dataContext.RegisteredApplications
                       where
                       o.AccessTokenRedirectURI.Contains(accessTokenRedirectURI)
                       select o;

            dataContext.RegisteredApplications.RemoveRange(list);
            dataContext.SaveChanges();
        }