import CRUDBase from '../CRUDBase.js' class ProviderResource extends CRUDBase { endpoint = '/api/v1/saml/providers' required_fields = ['name', 'acs_url', 'entity_id'] item = 'SAML Service Provider' plural = 'SAML Service Providers' listing_definition = { columns: [ { name: 'Provider Name', field: 'name', }, { name: 'Entity ID', field: 'entity_id', }, { name: 'Has SLO?', field: 'slo_url', renderer: 'boolean', }, { name: 'ACS URL', field: 'acs_url', }, ], actions: [ { type: 'resource', position: 'main', action: 'insert', text: 'Create New', color: 'success', }, { type: 'resource', position: 'row', action: 'update', icon: 'fa fa-edit', color: 'primary', }, ], } form_definition = { fields: [ { name: 'Provider Name', field: 'name', placeholder: 'Awesome External App', required: true, type: 'text', }, { name: 'Entity ID', field: 'entity_id', placeholder: 'https://my.awesome.app/saml/metadata.xml', required: true, type: 'text', }, { name: 'Assertion Consumer Service URL', field: 'acs_url', placeholder: 'https://my.awesome.app/saml/acs', required: true, type: 'text', }, { name: 'Single-Logout URL', field: 'slo_url', placeholder: 'https://my.awesome.app/saml/logout', type: 'text', }, ], } } const saml_provider = new ProviderResource() export { saml_provider }