{"info":{"_postman_id":"0d4c198b-da2b-441c-898c-20f88ee3cc10","name":"WithWine Auth API Public Documentation","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"3065679","collectionId":"0d4c198b-da2b-441c-898c-20f88ee3cc10","publishedId":"TzCQc7Qc","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-04-06T00:40:00.000Z"},"item":[{"name":"Authorization Code Flow","item":[{"name":"Authorization Code Flow - Get Code Step","event":[{"listen":"test","script":{"id":"70078ed4-2fba-40ce-a11e-dd02e0c212fb","exec":[""],"type":"text/javascript"}}],"id":"100ec5a5-c64b-4660-acdc-447767f8e947","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"accept":true}},"request":{"method":"GET","header":[{"key":"Accept","type":"text","value":"application/json"},{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/x-www-form-urlencoded"}],"url":"https://account.withwine.com/connect/authorize?client_id={{ClientId}}&redirect_uri=https://example.com/logincallback&response_type=code&scope=openid profile email roles offline_access&response_mode=form_post&x-client-SKU=postmanclient&x-client-ver=1.0.0&state=_VaryingOpaqueStateTokenGoesHere_&prompt=none","urlObject":{"protocol":"https","path":["connect","authorize"],"host":["account","withwine","com"],"query":[{"key":"client_id","value":"{{ClientId}}"},{"description":{"content":"<p>A URL to redirect to. Valid values are specified during OIDC client configuration</p>\n","type":"text/plain"},"key":"redirect_uri","value":"https://example.com/logincallback"},{"description":{"content":"<p>The authorization type. Typically, the \"code\" flow is used here</p>\n","type":"text/plain"},"key":"response_type","value":"code"},{"description":{"content":"<p>The required scopes. Valid values depend on the OIDC client configuration. For backend access, the scope \"withwine:brand\" should be included</p>\n","type":"text/plain"},"key":"scope","value":"openid profile email roles offline_access"},{"description":{"content":"<p>Currently, this is the only supported response mode</p>\n","type":"text/plain"},"key":"response_mode","value":"form_post"},{"description":{"content":"<p>A string describing the system making the request </p>\n","type":"text/plain"},"key":"x-client-SKU","value":"postmanclient"},{"description":{"content":"<p>The version of the system making the request</p>\n","type":"text/plain"},"key":"x-client-ver","value":"1.0.0"},{"description":{"content":"<p>A state generated by the client that can be verified by the client in the final step to prevent replay attacks.</p>\n","type":"text/plain"},"key":"state","value":"_VaryingOpaqueStateTokenGoesHere_"},{"description":{"content":"<p>Whether to prompt the user for login. Leave blank for the default. Otherwise, valid values are none, login, register.</p>\n<p>none: Does not prompt the user to login and will send an HTTP POST request to the logincallback with an error if the user is not already logged in.\nlogin: Always prompts the user to login\nregister: Always prompts the user to login but defaulting to a registration view</p>\n","type":"text/plain"},"key":"prompt","value":"none"}],"variable":[]}},"response":[],"_postman_id":"100ec5a5-c64b-4660-acdc-447767f8e947"},{"name":"Authorization Code Flow - Get Token Step","event":[{"listen":"test","script":{"id":"37de435b-f1a8-4814-9701-34859d334287","exec":["pm.test(\"Refresh token exists\", function () {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData.refresh_token).to.not.be.an('undefined');\r","\r","    pm.environment.set(\"WithWine.Auth.AuthCodeFlow.RefreshToken\", jsonData.refresh_token);\r","});"],"type":"text/javascript"}}],"id":"699250db-95c4-49fb-8851-72df16d51d1f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","type":"text","value":"application/json"},{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"grant_type","value":"authorization_code","type":"text"},{"key":"client_id","value":"{{ClientId}}","type":"text"},{"key":"client_secret","value":"{{ClientSecret}}","type":"text"},{"key":"code","value":"{{Code}}","type":"text"},{"key":"redirect_uri","value":"https://example.com/logincallback","type":"text"}]},"url":"https://account.withwine.com/connect/token","urlObject":{"protocol":"https","path":["connect","token"],"host":["account","withwine","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"699250db-95c4-49fb-8851-72df16d51d1f"},{"name":"Authorization Code Flow - Refresh Token Step","id":"c94376b0-3aa7-41e1-aa52-9f989773345f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","type":"text","value":"application/json"},{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"grant_type","value":"refresh_token","type":"text"},{"key":"client_id","value":"{{ClientId}}","type":"text"},{"key":"client_secret","value":"{{ClientSecret}}","type":"text"},{"key":"refresh_token","value":"{{RefreshToken}}","type":"text"}]},"url":"https://account.withwine.com/connect/token","urlObject":{"protocol":"https","path":["connect","token"],"host":["account","withwine","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"c94376b0-3aa7-41e1-aa52-9f989773345f"},{"name":"Authorization Code Flow - Logout","event":[{"listen":"test","script":{"id":"70078ed4-2fba-40ce-a11e-dd02e0c212fb","exec":[""],"type":"text/javascript"}}],"id":"0f056d25-fd64-471a-a3c7-3a6fc0a58eac","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"accept":true}},"request":{"method":"GET","header":[{"key":"Accept","type":"text","value":"application/json"},{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/x-www-form-urlencoded"},{"key":"prompt","value":"none","type":"text"}],"url":"https://account.withwine.com/connect/logout?client_id={{ClientId}}&redirect_uri=https://example.com/logincallback&response_type=code&scope=openid profile email roles offline_access&response_mode=form_post&x-client-SKU=postmanclient&x-client-ver=1.0.0&state=_VaryingOpaqueStateTokenGoesHere_&prompt=none","urlObject":{"protocol":"https","path":["connect","logout"],"host":["account","withwine","com"],"query":[{"key":"client_id","value":"{{ClientId}}"},{"key":"redirect_uri","value":"https://example.com/logincallback"},{"key":"response_type","value":"code"},{"key":"scope","value":"openid profile email roles offline_access"},{"key":"response_mode","value":"form_post"},{"key":"x-client-SKU","value":"postmanclient"},{"key":"x-client-ver","value":"1.0.0"},{"key":"state","value":"_VaryingOpaqueStateTokenGoesHere_"},{"key":"prompt","value":"none"}],"variable":[]}},"response":[],"_postman_id":"0f056d25-fd64-471a-a3c7-3a6fc0a58eac"}],"id":"04627612-2645-4ac1-b60c-1b44ca04234b","_postman_id":"04627612-2645-4ac1-b60c-1b44ca04234b","description":""},{"name":"Client Credentials Flow","item":[{"name":"Client Credentials Flow - Get Token Step","id":"3c7ab47d-7191-4390-854a-c1b16327ab28","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"},{"key":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"grant_type","value":"client_credentials","type":"text"},{"key":"client_id","value":"{{ClientId}}","type":"text"},{"key":"client_secret","value":"{{ClientSecret}}","type":"text"}]},"url":"https://account.withwine.com/connect/token","urlObject":{"protocol":"https","path":["connect","token"],"host":["account","withwine","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"3c7ab47d-7191-4390-854a-c1b16327ab28"}],"id":"60f0d968-aad7-4399-b690-a0cd4d45730e","_postman_id":"60f0d968-aad7-4399-b690-a0cd4d45730e","description":""}]}