I assume you’re talking about swagger-ui?

Which version of swagger-ui do you use?

 

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of Joshua Tester 
<joshuates...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Monday, 11 July 2016 at 12:57
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: OAuth 2 Implicit Flow on localhost

 

Good day, 

 

I am creating an Azure Web API application using .Net 4.6.1.

 

I have just a simple test controller that returns the string "success".  I have 
followed the instructions here: 
https://blogs.msdn.microsoft.com/pratushb/2016/04/28/enable-swagger-to-authenticate-against-azure-ad/
 and I have successfully setup the OAuth2 bearer tokens on the PUBLISHED azure 
web api site.

 

I have now tried to setup swagger, with the OAuth2 tokens from our AD tenant, 
to work when debugging on my https://;ocalhost:44305.  I click the 'On' button 
for the OAuth2 token and it goes to Azure AD and gets a token.  But the token 
is apparently invalid and just keeps telling me I am not authorized.  I did the 
exact same setup TWICE now and it continuously works on the published Azure API 
site.  Localhost continues to deny me.  If I remove the [Authorize] tags on the 
controller methods, it works fine.

 

Any thoughts, comments, questions are welcome.

 

Thank you for your time.

 

V/R

J

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to