UNPKG

api-console-assets

Version:

This repo only exists to publish api console components to npm

65 lines (57 loc) 3.25 kB
<!doctype html> <!-- @license Copyright (c) 2015 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt --> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes"> <title>auth-methods demo</title> <script src="../../webcomponentsjs/webcomponents-lite.js"></script> <link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html"> <link rel="import" href="../../arc-demo-helpers/arc-demo-snippet.html"> <link rel="import" href="../../paper-toggle-button/paper-toggle-button.html"> <link rel="import" href="../auth-methods.html"> <style is="custom-style" include="demo-pages-shared-styles"> .vertical-section-container { max-width: 600px; } output { white-space: pre-wrap; } </style> </head> <body unresolved> <div class="vertical-section-container centered"> <h3>The `auth-method-custom`</h3> <arc-demo-snippet raml='{"name":"x-custom","type":"x-custom","description":"A custom security scheme for authenticating requests.\n","describedBy":{"queryParameters":[{"name":"debugToken","displayName":"debugToken","type":"string","required":false,"description":"Select one of available values to run the request in the debug mode with selected level.","enum":["Info","Log","Warning","Error","Critical"],"key":"debugToken"},{"name":"booleanToken","displayName":"booleanToken","type":"boolean","default":true,"required":true,"description":"Just to test boolean values.","key":"booleanToken"}],"headers":[{"name":"SpecialToken","displayName":"SpecialToken","type":"string","required":true,"description":"Used to send a custom token.\n","key":"SpecialToken"}],"responses":[{"code":"401","description":"Bad token.\n"},{"code":"403"}]}}'> <template> <auth-method-custom raml-settings="[[raml]]" no-stepper="[[noStepper]]"></auth-method-custom> <paper-toggle-button checked="{{noStepper}}">Hide stepper</paper-toggle-button> <output id="log"></output> <style>auth-method-custom {margin-bottom: 40px;}</style> <script> var basic = document.querySelector('auth-method-custom'); var output = document.querySelector('output'); basic.addEventListener('auth-settings-changed', function(e) { var settings = JSON.stringify(e.detail.settings, null, 1); var text = 'Current settings:\n'; text += '\t ' + settings; this.innerHTML = text; }.bind(output)); basic.addEventListener('error', function(e) { this.innerHTML += e.detail.error.message + '\n'; }.bind(output)); </script> </template> </arc-demo-snippet> </div> </body> </html>