I am using SwaggerHub to document the API endpoints for my web application, but my app uses firebase authentication for login/register which is needed to receive a bearer token in order to perform the basic CRUD operations for the other endpoints. I am trying to figure out how to obtain the bearer token by logging in through SwaggerHub login api, but firebase authentication handles the login and register component, therefore I cannot include the endpoints that will generate the bearer token for me to test the other endpoints. The work I have so far is shown below:
I am using SwaggerHub to document the API endpoints for my web application, but my app uses firebase authentication for login/register which is needed to receive a bearer token in order to perform the basic CRUD operations for the other endpoints. I am trying to figure out how to obtain the bearer token by logging in through SwaggerHub login api, but firebase authentication handles the login and register component, therefore I cannot include the endpoints that will generate the bearer token for me to test the other endpoints. The work I have so far is shown below:
swagger: '2.0'
info:
description: An app that tracks trip activity for hikers and runners
version: 1.0.0
title: Journey Map
# put the contact info for your development or API team
contact:
email: eminmammadzada@knights.ucf.edu
#email2: keyoni_stallworth@knights.ucf.edu
#email3: rasuar@knights.ucf.edu
license:
name: Journey Map
url: https://journeymap-a8e65.web.app/
# tags are used for organizing operations
tags:
- name: Trips
description: Trip operations
- name: Users
description: User operations
paths:
#/:
#get:
#security:
# - Bearer: []
#responses:
# '200':
# description: 'Will send `Authenticated`'
#'403':
# description: 'You do not have necessary permissions for the resource'
/trips/{tripId}:
get:
description: View the details of a specific trip
tags:
- Trips
produces:
- application/json
parameters:
- in: path
name: tripId
required: true
type: string
security:
- firebase_auth: []
- Bearer: []
responses:
'200':
description: success
'400':
description: bad request
'403':
description: unauthorized
'404':
description: trip does not exist
host: journeymap-a8e65.firebaseapp.com
schemes:
- http
- https
securityDefinitions:
firebase_auth:
type: oauth2
flow: implicit
authorizationUrl: https://accounts.google.com/o/oauth2/auth
scopes:
user: user login
password: user password
Bearer:
type: apiKey
name: Authorization
in: header
description: >-
Enter the token with the `Bearer: ` prefix, e.g. "Bearer abcde12345".

Trending now
This is a popular solution!
Step by step
Solved in 2 steps









