You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
503 lines
12 KiB
503 lines
12 KiB
swagger: '2.0'
|
|
info:
|
|
description: 'This is a sample JWT authentication service. You can find out more about JWT at [https://jwt.io/](https://jwt.io/). For this sample, you can use the `admin` or `client` users (password: admin and client respectively) to test the authorization filters. Once you have successfully logged in and obtained the token, you should click on the right top button `Authorize` and introduce it with the prefix "Bearer ".'
|
|
version: 1.0.0
|
|
title: The authenticator for the Waterproofing Data (WPD) Work Packages
|
|
contact:
|
|
email: igsd@warwick.ac.uk
|
|
license:
|
|
name: Apache-2.0 License
|
|
url: https://opensource.org/licenses/Apache-2.0
|
|
host: localhost:8080
|
|
basePath: /
|
|
tags:
|
|
- name: forgotpasswords
|
|
description: Forgot Passwords Controller
|
|
- name: users
|
|
description: Operations about users
|
|
paths:
|
|
/forgotpasswords/findallforgotpasswordquestions:
|
|
get:
|
|
tags:
|
|
- forgotpasswords
|
|
summary: ${ForgotPasswordsController.findallforgotpasswordquestions}
|
|
operationId: findallforgotpasswordquestionsUsingGET
|
|
produces:
|
|
- '*/*'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/ForgotPasswordsQuestionsResponseDTO'
|
|
'400':
|
|
description: Something went wrong
|
|
security:
|
|
- Authorization:
|
|
- global
|
|
deprecated: false
|
|
/forgotpasswords/loginbyemailandanswers:
|
|
post:
|
|
tags:
|
|
- forgotpasswords
|
|
summary: ${ForgotPasswordsController.loginbyemailandanswers}
|
|
operationId: loginbyemailandanswersUsingPOST
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- '*/*'
|
|
parameters:
|
|
- in: body
|
|
name: answers
|
|
description: Answers
|
|
required: false
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/ForgotPasswordsQuestionsUsersAnswersRequestDTO'
|
|
- name: email
|
|
in: query
|
|
description: Email
|
|
required: false
|
|
type: string
|
|
allowEmptyValue: false
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
schema:
|
|
type: string
|
|
'400':
|
|
description: Something went wrong
|
|
'404':
|
|
description: The user or answer don't exist
|
|
'422':
|
|
description: Invalid answers supplied to login. Must have at least 2 correct ones.
|
|
security:
|
|
- Authorization:
|
|
- global
|
|
deprecated: false
|
|
/forgotpasswords/loginbyemailandkey:
|
|
post:
|
|
tags:
|
|
- forgotpasswords
|
|
summary: ${ForgotPasswordsController.loginbyemailandkey}
|
|
operationId: loginbyemailandkeyUsingPOST
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- '*/*'
|
|
parameters:
|
|
- name: email
|
|
in: query
|
|
description: Email
|
|
required: false
|
|
type: string
|
|
allowEmptyValue: false
|
|
- name: key
|
|
in: query
|
|
description: Key
|
|
required: false
|
|
type: string
|
|
allowEmptyValue: false
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
schema:
|
|
type: string
|
|
'400':
|
|
description: Something went wrong
|
|
'422':
|
|
description: Invalid username/password supplied
|
|
security:
|
|
- Authorization:
|
|
- global
|
|
deprecated: false
|
|
/forgotpasswords/passwordupdatebyemail:
|
|
post:
|
|
tags:
|
|
- forgotpasswords
|
|
summary: ${ForgotPasswordsController.passwordupdatebyemail}
|
|
operationId: passwordupdatebyemailUsingPOST
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- '*/*'
|
|
parameters:
|
|
- name: email
|
|
in: query
|
|
description: Email
|
|
required: false
|
|
type: string
|
|
allowEmptyValue: false
|
|
- name: newPassword
|
|
in: query
|
|
description: NewPassword
|
|
required: false
|
|
type: string
|
|
allowEmptyValue: false
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
'400':
|
|
description: Something went wrong
|
|
'403':
|
|
description: Access denied
|
|
'404':
|
|
description: The user doesn't exist
|
|
'500':
|
|
description: Expired or invalid JWT token
|
|
security:
|
|
- Authorization:
|
|
- global
|
|
- apiKey: []
|
|
deprecated: false
|
|
/forgotpasswords/saveforgotpasswordquestionsusersanswers:
|
|
post:
|
|
tags:
|
|
- forgotpasswords
|
|
summary: ${ForgotPasswordsController.saveforgotpasswordquestionsusersanswers}
|
|
operationId: saveforgotpasswordquestionsusersanswersUsingPOST
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- '*/*'
|
|
parameters:
|
|
- in: body
|
|
name: answer
|
|
description: Forgot Password Questions Users Answers
|
|
required: false
|
|
schema:
|
|
$ref: '#/definitions/ForgotPasswordsQuestionsUsersAnswersRequestDTO'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
'400':
|
|
description: Something went wrong
|
|
'403':
|
|
description: Access denied
|
|
'404':
|
|
description: The user or forgot password questions don't exist
|
|
'500':
|
|
description: Expired or invalid JWT token
|
|
security:
|
|
- Authorization:
|
|
- global
|
|
- apiKey: []
|
|
deprecated: false
|
|
/forgotpasswords/sendkeybyemail:
|
|
post:
|
|
tags:
|
|
- forgotpasswords
|
|
summary: ${ForgotPasswordsController.sendkeybyemail}
|
|
operationId: sendkeybyemailUsingPOST
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- '*/*'
|
|
parameters:
|
|
- name: email
|
|
in: query
|
|
description: Email
|
|
required: false
|
|
type: string
|
|
allowEmptyValue: false
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
'400':
|
|
description: Something went wrong
|
|
'422':
|
|
description: Invalid email supplied
|
|
security:
|
|
- Authorization:
|
|
- global
|
|
deprecated: false
|
|
/users/activate:
|
|
post:
|
|
tags:
|
|
- users
|
|
summary: ${UserController.activate}
|
|
operationId: activateUsingPOST
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- '*/*'
|
|
parameters:
|
|
- name: activationkey
|
|
in: path
|
|
description: ActivationKey
|
|
required: false
|
|
type: string
|
|
- name: username
|
|
in: path
|
|
description: Username
|
|
required: false
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
schema:
|
|
type: string
|
|
'400':
|
|
description: Something went wrong
|
|
'403':
|
|
description: Access denied
|
|
'404':
|
|
description: The user doesn't exist
|
|
'500':
|
|
description: Expired or invalid JWT token
|
|
security:
|
|
- Authorization:
|
|
- global
|
|
- apiKey: []
|
|
deprecated: false
|
|
/users/login:
|
|
post:
|
|
tags:
|
|
- users
|
|
summary: ${UserController.login}
|
|
operationId: loginUsingPOST
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- '*/*'
|
|
parameters:
|
|
- name: password
|
|
in: query
|
|
description: Password
|
|
required: false
|
|
type: string
|
|
allowEmptyValue: false
|
|
- name: username
|
|
in: query
|
|
description: Username
|
|
required: false
|
|
type: string
|
|
allowEmptyValue: false
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
schema:
|
|
type: string
|
|
'400':
|
|
description: Something went wrong
|
|
'422':
|
|
description: Invalid username/password supplied
|
|
security:
|
|
- Authorization:
|
|
- global
|
|
deprecated: false
|
|
/users/me:
|
|
get:
|
|
tags:
|
|
- users
|
|
summary: ${UserController.me}
|
|
operationId: whoamiUsingGET
|
|
produces:
|
|
- '*/*'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/UsersResponseDTO'
|
|
'400':
|
|
description: Something went wrong
|
|
'403':
|
|
description: Access denied
|
|
'500':
|
|
description: Expired or invalid JWT token
|
|
security:
|
|
- Authorization:
|
|
- global
|
|
- apiKey: []
|
|
deprecated: false
|
|
/users/refresh:
|
|
get:
|
|
tags:
|
|
- users
|
|
summary: refresh
|
|
operationId: refreshUsingGET
|
|
produces:
|
|
- '*/*'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
schema:
|
|
type: string
|
|
security:
|
|
- Authorization:
|
|
- global
|
|
deprecated: false
|
|
/users/signup:
|
|
post:
|
|
tags:
|
|
- users
|
|
summary: ${UserController.signup}
|
|
operationId: signupUsingPOST
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- '*/*'
|
|
parameters:
|
|
- in: body
|
|
name: user
|
|
description: Signup User
|
|
required: false
|
|
schema:
|
|
$ref: '#/definitions/UsersRequestDTO'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
schema:
|
|
type: string
|
|
'400':
|
|
description: Something went wrong
|
|
'403':
|
|
description: Access denied
|
|
'422':
|
|
description: Username is already in use
|
|
security:
|
|
- Authorization:
|
|
- global
|
|
deprecated: false
|
|
/users/{username}:
|
|
get:
|
|
tags:
|
|
- users
|
|
summary: ${UserController.search}
|
|
operationId: searchUsingGET
|
|
produces:
|
|
- '*/*'
|
|
parameters:
|
|
- name: username
|
|
in: path
|
|
description: Username
|
|
required: false
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/UsersResponseDTO'
|
|
'400':
|
|
description: Something went wrong
|
|
'403':
|
|
description: Access denied
|
|
'404':
|
|
description: The user doesn't exist
|
|
'500':
|
|
description: Expired or invalid JWT token
|
|
security:
|
|
- Authorization:
|
|
- global
|
|
- apiKey: []
|
|
deprecated: false
|
|
securityDefinitions:
|
|
Authorization:
|
|
type: apiKey
|
|
name: Authorization
|
|
in: header
|
|
definitions:
|
|
EduCemadenOrganizations:
|
|
type: object
|
|
properties:
|
|
activationkey:
|
|
type: string
|
|
active:
|
|
type: string
|
|
address:
|
|
type: string
|
|
creation_date:
|
|
type: string
|
|
id:
|
|
type: integer
|
|
format: int32
|
|
inep_code:
|
|
type: string
|
|
login:
|
|
type: string
|
|
name:
|
|
type: string
|
|
phone:
|
|
type: string
|
|
responsible:
|
|
type: string
|
|
type:
|
|
type: string
|
|
website:
|
|
type: string
|
|
title: EduCemadenOrganizations
|
|
ForgotPasswordsQuestionsResponseDTO:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
format: int32
|
|
question:
|
|
type: string
|
|
active:
|
|
type: integer
|
|
format: int32
|
|
title: ForgotPasswordsQuestionsResponseDTO
|
|
ForgotPasswordsQuestionsUsersAnswersRequestDTO:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
format: int32
|
|
forgotpasswordquestionsid:
|
|
type: integer
|
|
format: int32
|
|
usersid:
|
|
type: integer
|
|
format: int32
|
|
answer:
|
|
type: string
|
|
title: ForgotPasswordsQuestionsUsersAnswersRequestDTO
|
|
UsersRequestDTO:
|
|
type: object
|
|
properties:
|
|
username:
|
|
type: string
|
|
password:
|
|
type: string
|
|
title: UsersRequestDTO
|
|
UsersResponseDTO:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
format: int32
|
|
username:
|
|
type: string
|
|
roles:
|
|
type: array
|
|
items:
|
|
type: string
|
|
enum:
|
|
- ROLE_ADMIN
|
|
- ROLE_INSTITUTION
|
|
- ROLE_CLIENT
|
|
eduCemadenOrganization:
|
|
$ref: '#/definitions/EduCemadenOrganizations'
|
|
rolesProviderActivationKeys:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/UsersRolesproviderActivationKey'
|
|
title: UsersResponseDTO
|
|
UsersRolesproviderActivationKey:
|
|
type: object
|
|
properties:
|
|
activationkey:
|
|
type: string
|
|
id:
|
|
type: integer
|
|
format: int32
|
|
rolesid:
|
|
type: integer
|
|
format: int32
|
|
usersid:
|
|
type: integer
|
|
format: int32
|
|
title: UsersRolesproviderActivationKey
|