Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add authentication to swagger #1514

Closed
Hedgehogues opened this issue May 4, 2020 · 1 comment
Closed

Add authentication to swagger #1514

Hedgehogues opened this issue May 4, 2020 · 1 comment

Comments

@Hedgehogues
Copy link

Environment

  • PostgreSQL version: latest
  • PostgREST version: latest
  • Operating system: Ubuntu 18.04

Description of issue

Hello. I start postgrest with next docker-compose:

version: "3"
services:
  swagger:
    image: swaggerapi/swagger-ui
    ports:
      - "8080:8080"
    expose:
      - "8080"
    environment:
      API_URL: http://localhost:3000/
  db:
    restart: always
    image: "postgres:11"
    container_name: "atm_postgres"
    environment:
      - POSTGRES_USER=test
      - POSTGRES_PASSWORD=test
      - POSTGRES_DB=test_db
    ports:
      - '5432:5432'
    volumes:
      - ./data/my_dbdata:/var/lib/postgresql/data

and next postgrest config:

db-uri = "postgresql://test:test@0.0.0.0:5432/test_db"
db-schema = "api"
db-anon-role = "web_anon"
jwt-secret = "ZaYmgVILsN1fOonIZdrNHm3ZChg0VrWP"

I go to the swagger and I cannot post new item therefore swagger has not header with authentication:

image

How I fix it?

@steve-chavez
Copy link
Member

@Hedgehogues There are some solutions in #1082. Let's continue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants