Base solution for your next web application
Open Closed

Swagger UI - how to "Authorize" #5994


User avatar
0
maxgeller created

I'm wanting to install my Angular + ASP.NET Core application, and have followed the instructions to the best of my ability using the Angular & Azure step-by-step walkthroughs. Using the features locally works fine, but when I publish my server application through Azure, I find the Swagger UI environment.

My question is what is the function of the "Authorize" button? I can't seem to login using any sort of credentials....

What is this used for? What credentials are used for this?

I would like to implement a Multi-Tennant Solution using Azure, but can't seem to figure out what this "authorize" feature is used for.


5 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    Most API interfaces require user credentials (after logging in to the system) to be called. You can log in with your account password and swagger will automatically attach credentials to the request.

  • User Avatar
    0
    maxgeller created

    Hmm.. So the Swagger UI page in an API interface, and this interface requires credentials.

    I'm wondering which credentials are used and/or how they are created.

    From my Azure Active Directory? From the ASP NET Zero Website? From my SQL database?

    Thanks for the help!

  • User Avatar
    0
    maliming created
    Support Team

    Just like your website has some web apis, some allow anonymous calls, and some require user credentials to be called. The credentials may be a username password, or a token.

  • User Avatar
    0
    maxgeller created

    Thanks maliming, but where do the credentials come from? How are they originated? How do I create these credentials?

    Which username/password goes in the login box after pressing the "Authorize" button (see attached)?

    Is it my Azure username/password? Is it my ASPNETZero username/password? Is it my Azure SQL Database username/password? Do I need to sign up for a 'swagger' account and use those as credentials? Do I add credentials so some sort of document in the ASP.NET project file and re-publish?

    Nothing seems to be working...

  • User Avatar
    1
    aaron created
    Support Team

    It's what you use to login to the application.