Ticket Q474203
Visible to All Users

How to skip the logon page and automatically authenticate a user in code (e.g. from an external link)

created 12 years ago

Hi
my XAF web site is using as you can see in the
attached picture is using the following security components:

  1. SecurityComplex
      2.AuthenticationStandard
    and is showing you standard login view as first
    view.
    I need to allow an external system to open an
    internal view or even the dashboard,
    without the login view,
    is there a way to allow override this login
    authentication is some way?
    I have a WS that is connected to the XAF ORM, so I
    can provide authentication data if needed.
    can the user override the login by using a specific
    URL maybe?
    Thank you
    Yaniv

Answers approved by DevExpress Support

created 12 years ago (modified 2 years ago)

Hello Yaniv,

To accomplish this task, you can create a special user and configure its permissions to grant access only to a certain dashboard view. Then authenticate this user in code, when required (see Pass login arguments to application). To indicate that the user should be authenticated in code, you can pass a custom parameter to the request URL. To learn how to retrieve parameters from the URL, refer to the following tickets:
Passing parameter in QueryString
link to new object from standard aspx page

Update:

I have created a sample project and decided that it will be easier to use an additional page to perform the required actions in the XAF application. In this case, it is not necessary to process XAF shortcuts. Please see the code of the WebForm1.aspx. It is also required to allow unsecured access to this page in Web.config:

XML
<location path="WebForm1.aspx"> <system.web> <authorization> <allow users="?" /> </authorization> </system.web> </location>

To test the sample, first start the XAF application (or publish it on the IIS) and then start the WebApplication1.

See also:
How to open a View specified in an external link after logging in

T234465: How to skip authentication and automatically redirect a user to the New Password dialog by a link from email

    Show previous comments (9)
    Anatol (DevExpress) 12 years ago

      I am happy to hear that the problem is resolved. Feel free to contact us if you need further assistance.

        Hello

        I tried this with Version 17.2.6 and found that Logon() doesn't support these arguments. Can you help?

        Regards
        Chris

        Andrey K (DevExpress Support) 7 years ago

          Hello,

          The current thread is quite old, please refer to the T234465: How to skip authentication and automatically redirect a user to the New Password dialog by a link from email thread where the same task was solved. Let us know if you face any difficulties.

          Thanks,
          Andrey

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.