Skip to content

Commit

Permalink
Merge pull request #53 from camaraproject/bigludo7-patch-1
Browse files Browse the repository at this point in the history
Fixed one-time-password-sms.yaml after megalinter check
  • Loading branch information
bigludo7 authored Apr 18, 2024
2 parents c0c925c + 297de21 commit 82d5368
Showing 1 changed file with 11 additions and 6 deletions.
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

0 comments on commit 82d5368

Please sign in to comment.