Add Captcha and Windows Authentication to Admin Login

Posted by Community Admin on 04-Aug-2018 06:18

Add Captcha and Windows Authentication to Admin Login

All Replies

Posted by Community Admin on 07-Mar-2013 00:00

Hi Team Telerik,

I need to make the admin more secured, hence we decided to add the captcha to the admin login page. Can you let us know how we can acheive this?

Also, we need to add windows authentication to the admin section, before the user can enter the admin username and password?

Can you let us know, more on this?


Regards,
Siddesh Kapadi

Posted by Community Admin on 11-Mar-2013 00:00

Hello Siddesh,


That's a tough one, we do not offer a CAPTCHA implementation for our login control, however you can try customizing it by modifying the default template for the backend login widget and then mapping the external template to the HostType of the backend login - Telerik.Sitefinity.Security.Web.UI.StsLoginForm, Telerik.Sitefinity.

For your convenience, please find below the default template we're using:

<%@ Control Language="C#" %>
<%@ Register TagPrefix="sf" Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" %>
<script runat="server">
 
    protected void Unnamed_Click(object sender, EventArgs e)
    
 
    
</script>
 
 
<sf:ResourceLinks id="resourceLinks" runat="server">
    <sf:ResourceFile Name="Styles/Login.css" />
</sf:ResourceLinks>
 
<fieldset class="sfLoginForm">
    <asp:Panel ID="Panel1" CssClass="sfForm" runat="server" DefaultButton="hiddenSubmitButton">
        <div class="sfFormIn" id="LoginFormControl">
            <div class="sfLoginShadowTopRight"></div>
            <div class="sfLoginShadowBottomLeft"></div>
            <h2>
                <asp:Literal ID="LoginTitle" Text="<%$ Resources:Labels, LoginToManage %>" runat="server" />
            </h2>
            <sf:SitefinityLabel runat="server" id="errorLabel" WrapperTagName="div" HideIfNoText="True" CssClass="sfFailure" />
            <ol>
                <li runat="server" id="ProvidersPanel" style="display:none;"> <%--Hide the providers dropdown. This will be handled by user (See LoginClick() implementation below--%>
                    <asp:Label ID="ProviderLabel" AssociatedControlID="ProvidersList" runat="server" Text="<%$ Resources:Labels, Provider %>" CssClass="sfTxtLbl" />
                    <select id="ProvidersList" runat="server" onchange="providersListChange();" />
                    <input id="sf_domain" name="sf_domain" type="hidden" />
                </li>
                <li>
                    <label for="wrap_name" class="sfTxtLbl">
                        <asp:Literal ID="Literal1" Text="<%$ Resources:Labels, Username %>" runat="server" />
 
                    </label>
                    <input type="text" id="wrap_name" name="wrap_name" class="sfTxt" />
                </li>
                <li>
                    <label for="wrap_password" class="sfTxtLbl">
                        <asp:Literal ID="Literal2" Text="<%$ Resources:Labels, Password %>" runat="server" />
                    </label>
                    <input type="password" id="wrap_password" name="wrap_password" class="sfTxt" />
                </li>
 
                <li class="sfCheckBoxWrapper">
                    <input type="checkbox" id="sf_persistent" name="sf_persistent" value="true" checked="checked" />
                    <label for="sf_persistent">
                        <asp:Literal ID="Literal3" Text="<%$ Resources:Labels, RememberMe %>" runat="server" />
                    </label>
                </li>
 
                <li runat="server" id="StartupHintPanel" visible="false">
                    <a id="StartupHintLink" onclick="startupHintClick()" class="sfMoreDetails sfHelpLnk">
                        <asp:Literal ID="LoginDemoCredentialsQuestion" Text="<%$ Resources:Labels, LoginDemoCredentialsQuestion %>" runat="server" />
                    </a>
 
                    <div id="startupHint" class="sfNeutral sfCredentialInfo" style="display: none;">
                        <p>
                            <asp:Label ID="StartupHintBody" runat="server" Text="<%$ Resources:Labels, LoginDemoCredentialsHint %>" />
                        </p>
                        <ul>
                            <li>
                                <asp:Literal ID="Literal4" Text="<%$ Resources:Labels, UsernameLower %>" runat="server" />:
                                <sf:SitefinityLabel id="DefaultUser" runat="server" WrapperTagName="strong" />
                            </li>
                            <li>
                                <asp:Literal ID="Literal5" Text="<%$ Resources:Labels, PasswordLower %>" runat="server" />:                                 
                                <sf:SitefinityLabel id="DefaultPassword" runat="server" WrapperTagName="strong" />
                            </li>
                        </ul>
                    </div>
                </li>
            </ol>
            <div class="sfSubmitBtn sfMainFormBtns">
                <asp:LinkButton ID="LinkButton1" runat="server" CssClass="sfLinkBtn sfSave" OnClientClick="LoginClick()">
                    <strong class="sfLinkBtnIn">
                        <asp:Literal ID="LoginButtonLiteral" runat="server" Text="<%$ Resources:Labels, LoginCaps %>" />
                    </strong>
                </asp:LinkButton>
            </div>
            <!-- do not remove this button. It is used for the default form submit (pressing enter) -->
            <div style="display: none;">
                <input type="hidden" id="isFormRequest" name="isFormRequest" value="true" />
                <asp:Button ID="hiddenSubmitButton" runat="server" />
            </div>
        </div>
    </asp:Panel>
</fieldset>
 
<script type="text/javascript">
    var providersList;
    var sf_domain;
 
    function pageLoad()
        $("body").addClass("sfLogin sfNoSidebar");
        sf_domain = $get("sf_domain");
        providersList = $get("<%= ProvidersList.ClientID %>");
        if (providersList && sf_domain)
            sf_domain.value = getProvidersListValue();
    
 
    function getProvidersListValue()
        var index = providersList.selectedIndex;
        if (index > -1 && providersList.options.length > index)
            return providersList.options[index].value;
        
        return "";
    
 
    function startupHintClick()
        $("#startupHint").toggle();
    
 
    //Logic for handling provider\username pattern in the UserName input
    function LoginClick()
        var username_value = $get('wrap_name').value;
        if (username_value && username_value.indexOf('\\' !== -1))
            var parsed = username_value.split('\\');
            if (parsed.length > 0)
                $get('wrap_name').value = parsed[1];
                sf_domain.value = parsed[0];
            
        
    
 
    function providersListChange()
        sf_domain.value = getProvidersListValue();
 
        return true;
    
</script>



Kind regards,
Boyan Barnev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 29-Apr-2015 00:00

Hi Guys, 
Is it possible to implement the Captcha into the sitefinity login. I did manage to implement captcha in two steps. In step 1: Captcha appears and when validated the user is directed to step 2 which is the login form.
I am struggling to do it in one step and make captcha appear below the login form. I am using version 6 and not having luck any success finding information on how to do it. 


Any assistance would greatly be appreciated. Thanks!


Posted by Community Admin on 04-May-2015 00:00

Hello Muhammad,

There is no captcha for the login widget out of the box, you can find a tutorial how to implement this here:
http://docs.sitefinity.com/tutorial-add-a-radcaptcha-to-the-login-widget.

You can than hide the default login backend widget and use this amended one under:
Administration > Backend Pages > Sitefinity > Login > Login page

I hope the information above was useful.

Regards,
Svetoslav Manchev
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed