import React from "react" import PropTypes from "prop-types" import ImPropTypes from "react-immutable-proptypes" export default class Auths extends React.Component { static propTypes = { authorized: ImPropTypes.orderedMap.isRequired, schema: ImPropTypes.orderedMap.isRequired, name: PropTypes.string.isRequired, getComponent: PropTypes.func.isRequired, onAuthChange: PropTypes.func.isRequired, errSelectors: PropTypes.object.isRequired, } render() { let { schema, name, getComponent, onAuthChange, authorized, errSelectors } = this.props const ApiKeyAuth = getComponent("apiKeyAuth") const BasicAuth = getComponent("basicAuth") let authEl const type = schema.get("type") switch(type) { case "apiKey": authEl = break case "basic": authEl = break default: authEl =
Unknown security definition type { type }
} return (
{ authEl }
) } }