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

Fixed one-time-password-sms.yaml after megalinter check #53

Merged
merged 2 commits into from
Apr 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions code/API_definitions/one-time-password-sms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ info:
Service Enabling Network Function API to send short-lived OTPs (one time passwords) to a phone number via SMS and validate it afterwards, in order to verify the phone number as a proof of possession.

# Relevant Definitions and concepts
- **NaaS**: *Network-as-a-Service* model where Telco Network resources are exposed to third parties through APIs. In this particular API, One Time Password is exposed following this model.
- **NaaS**: *Network-as-a-Service* model where Telco Network resources are exposed to third parties through APIs. In this particular API, One Time Password is exposed following this model.
- **OTP**: *One Time password* is a one-time authorization code (OTAC) that is valid for only one login session or transaction.

# API Functionality
# API Functionality
It enables a Service Provider (SP) to send an OTP code by SMS and validate it to verify the phone number (MSISDN) as a proof of possession.

# Resources and Operations overview
Expand Down Expand Up @@ -92,7 +92,7 @@ paths:
$ref: '#/components/responses/Generic504'
security:
- two_legged:
- one-time-password-sms:send-validate
- one-time-password-sms:send-validate
/validate-code:
post:
tags:
Expand Down Expand Up @@ -146,27 +146,30 @@ paths:
$ref: '#/components/responses/Generic504'
security:
- two_legged:
- one-time-password-sms:send-validate
- one-time-password-sms:send-validate
components:
schemas:
SendCodeBody:
description: Structure to request sending a code to a phone number
type: object
properties:
phoneNumber:
$ref: '#/components/schemas/PhoneNumber'
message:
$ref: '#/components/schemas/Message'
$ref: '#/components/schemas/Message'
required:
- phoneNumber
- message
SendCodeResponse:
description: Structure to provide authentication identifier
type: object
properties:
authenticationId:
$ref: '#/components/schemas/AuthenticationId'
required:
- authenticationId
ValidateCodeBody:
description: Strcuture to request code verification
type: object
properties:
authenticationId:
Expand Down Expand Up @@ -198,6 +201,7 @@ components:
maxLength: 10
example: AJY3
ErrorInfo:
description: Structure to describe error
type: object
required:
- status
Expand All @@ -216,11 +220,12 @@ components:
securitySchemes:
two_legged:
type: oauth2
description: oauth2 security schema
flows:
clientCredentials:
tokenUrl: https://auth.example.com/token
scopes:
one-time-password-sms:send-validate: Permission to send OTP by SMS and to validate it
one-time-password-sms:send-validate: Permission to send OTP by SMS and to validate it
responses:
Generic400:
description: Problem with the client request
Expand Down