0

How to configure OAuth2.0 for OpenAPI in SprintBootApplication as the configuration we are using in Postman is working but not in Spring Microservice

Using Postman the settings for OAuth2.0 are GrantType: Client Credentials Access Token Url: https://****//token.oauth2 Client ID: *************** Client Secret: *********** Scope: API Client Authentication: Send as Basic Auth Header

Token Type: Access Token

I am unable to use the same settings in SpringBoot Application to call the same Proxy used in postman. We are using APIGEE Gateway for this configuration

I am using in my Spring Boot Application Main Class

@SecurityScheme(name = "security_auth", type = SecuritySchemeType.OAUTH2,
flows = @OAuthFlows (authorizationCode = @OAuthFlow(
        authorizationUrl = "${springdoc.oAuthFlow.authorizationUrl}"
        , tokenUrl = "${springdoc.oAuthFlow.tokenUrl}")))

How to configure GrantType, Scope and Client Authentication in the @OAuthFlows in @SecurityScheme.

Can anyone help me?

enter image description here

I am expecting the configuration for OAuth2.0 in SpringBootApplication to use in OpenAPI

0 Answers0