IdentityServer4 Postman


Please Share

How to set up PostMan authentication to an Itendity server 4 Identity server. Have you been trying to test your API with authentication? Are you using Identityserver4?

Client



The following client Will allow you to connect using Postman. Note that the grant type needs to be authorization_code and that you will need a redirectURI of https://www.getpostman.com/oauth2/callback.

{
    "client": {
        "allowOfflineAccess": true,
        "allowedScopes": [
            "openid",
            "profile",
            "testapi"
        ],
        "logoutUri": null,
        "redirectUris": [
            "https://www.getpostman.com/oauth2/callback"
        ],
        "enabled": true,
        "clientId": "832afa32-cabe-40a0-8909-2241cd85e47d.Local.apps",
        "clientSecrets": [
            "NotASecret"
        ],
        "clientName": "PostMan Login",
        "postLogoutRedirectUris": [
            "http://localhost:5002/signout-callback-oidc"
        ],
        "clientUri": null,
        "allowedGrantTypes": [
            "authorization_code"
        ],
        "allowAccessTokensViaBrowser": true,
        "logoUri": null
    }
}

Postman settings

In postman on the Authorization tab select type of Oauth 2.0. Then you can set up postman authentication as so.

Conclusion

Using postman to test your API calls is quite easy even if you need authentication in order to access the api endpoint.

Please Share


Linda Lawton

About Linda Lawton

My name is Linda Lawton I have more than 20 years experience working as an application developer and a database expert. I have also been working with Google APIs since 2012 and I have been contributing to the Google .Net client library since 2013. In 2013 I became a a Google Developer Experts for Google Analytics.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.