Jump to content

Mashery API Secuirty Setting using Swagger 2.0


Bhaskar Gara

Recommended Posts

This is (securityProfile below) from my API JSON. I want to build similar in Swagger so that when import swagger file, all these security features will be enabled in Mashery local. I tried a different option in Swagger "securityDefintions". When I import swagger file, I don't see oauth is enable in Security Setting of Mashery.

securityDefinitions: hybris_auth: type: oauth2 scopes: 'write:pets': Modify pets in your account 'read:pets': Read your pets flow: accessCode tokenUrl: 'https://local.com/rest/oauth2/v1/token' authorizationUrl: 'http://petstore.swagger.wordnik.com/api/oaut/requestToken'

 

"securityProfile": { "oauth": { "qpsLimitCeiling": 5, "rateLimitCeiling": 10000, "macAlgorithm": "hmac-sha-1", "grantTypes": [ "authorization_code", "implicit", "client_credentials" ], "accessTokenTtl": 0, "accessTokenType": "bearer", "authorizationCodeTtl": 18000, "forwardedHeaders": [ "access-token", "client-id", "scope", "user-context" ], "refreshTokenTtl": 3600, "accessTokenTtlEnabled": false, "allowMultipleToken": false, "enableRefreshTokenTtl": true, "forceOauthRedirectUrl": false, "forceSslRedirectUrlEnabled": false, "masheryTokenApiEnabled": false, "refreshTokenEnabled": true, "secureTokensEnabled": false, "tokenBasedRateLimitsEnabled": true } },

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...