Auvious Auth Server API v1.8.8-beta.0
Auvious Auth Server provides the core security related services.
You are viewing REST API documentation. This documentation is auto-generated from a swagger specification which itself is generated from annotations in the source code of the project. It is possible that this documentation includes bugs and that code samples are incomplete or wrong.
Authentication
HTTP Authentication, scheme: bearer
OAuth 2.0 Authorization.
Flow: clientCredentials
OAuth 2.0 Token URL = https://auvious.video/security/oauth/token
OAuth 2.0 Scope
Scope Scope Description
Otp Verification Service
Request an otp
POST http://auvious.video/security/otp HTTP/1.1
Host: auvious.video
Content-Type: application/json
Accept: */*
Request a otp verification code. Returns an otp verification id which should be passed on calls that are protected with otp.
Request body
{
"to": "+306957206309",
"channel": "SMS",
"customName": "hello, world",
"locale": "en"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | RequestOtpCommand | true | none |
Responses
Overview
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | OtpRequestResult |
Examples
200 Response
To perform this operation, you must be authenticated by means of one of the following methods: BearerToken, OAuth2ClientCredentials
Code samples
- Shell
- Go
- Node
- Java
- Python
- Ruby
curl -X POST http://auvious.video/security/otp \
-H 'Content-Type: application/json' \ -H 'Accept: */*' \ -H 'Authorization: Bearer {access-token}'
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"*/*"},
"Authorization": []string{"Bearer {access-token}"},
}
var body []byte
// body = ...
req, err := http.NewRequest("POST", "http://auvious.video/security/otp", bytes.NewBuffer(body))
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const fetch = require('node-fetch');
const input = '{
"to": "+306957206309",
"channel": "SMS",
"customName": "hello, world",
"locale": "en"
}';
const headers = {
'Content-Type': 'application/json', 'Accept': '*/*', 'Authorization': 'Bearer {access-token}'
}
fetch('http://auvious.video/security/otp', {
method: 'POST',
body: input,
headers
})
.then(r => r.json())
.then((body) => {
console.log(body)
})
// This sample needs improvement.
URL obj = new URL("http://auvious.video/security/otp");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream())
);
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
import requests
headers = {
'Content-Type': 'application/json',
'Accept': '*/*',
'Authorization': 'Bearer {access-token}'
}
r = requests.post(
'http://auvious.video/security/otp',
params={},
headers = headers)
print r.json()
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => '*/*',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post 'http://auvious.video/security/otp',
params: {}, headers: headers
p JSON.parse(result)
Verify an otp
POST http://auvious.video/security/otp/verify HTTP/1.1
Host: auvious.video
Content-Type: application/json
Verify an otp verification code.
Request body
{
"to": "+306957206309",
"code": "123456",
"verificationId": "1234567890"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | VerifyOtpCommand | true | none |
Responses
Overview
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
To perform this operation, you must be authenticated by means of one of the following methods: BearerToken, OAuth2ClientCredentials
Code samples
- Shell
- Go
- Node
- Java
- Python
- Ruby
curl -X POST http://auvious.video/security/otp/verify \
-H 'Content-Type: application/json' \ -H 'Authorization: Bearer {access-token}'
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
var body []byte
// body = ...
req, err := http.NewRequest("POST", "http://auvious.video/security/otp/verify", bytes.NewBuffer(body))
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const fetch = require('node-fetch');
const input = '{
"to": "+306957206309",
"code": "123456",
"verificationId": "1234567890"
}';
const headers = {
'Content-Type': 'application/json', 'Authorization': 'Bearer {access-token}'
}
fetch('http://auvious.video/security/otp/verify', {
method: 'POST',
body: input,
headers
})
.then(r => r.json())
.then((body) => {
console.log(body)
})
// This sample needs improvement.
URL obj = new URL("http://auvious.video/security/otp/verify");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream())
);
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
import requests
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post(
'http://auvious.video/security/otp/verify',
params={},
headers = headers)
print r.json()
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post 'http://auvious.video/security/otp/verify',
params: {}, headers: headers
p JSON.parse(result)
Schemas
RequestOtpCommand
{
"to": "+306957206309",
"channel": "SMS",
"customName": "hello, world",
"locale": "en"
}
Request OTP command
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
to | string | true | none | Where to? |
channel | string | false | none | Channel to use |
customName | string | false | none | custom name to use instead of default |
locale | string | false | none | locale to use |
Enumerated Values
Property | Value |
---|---|
to | any phone number, or email if supported |
channel | UNKNOWN |
channel | SMS |
channel | VOICE |
channel | |
channel | SMS |
customName | any string, but keep it short |
locale | af, ar, ca, cs, da, de, el, en, en-GB, es, fi, fr, he, hi, hr, hu, id, it, ja, ko, ms, nb, nl, pl, pt, pr-BR, ro, ru, sv, th, tl, tr, vi, zh, zh-CN, or zh-HK. |
OtpRequestResult
{
"id": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
VerifyOtpCommand
{
"to": "+306957206309",
"code": "123456",
"verificationId": "1234567890"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
to | string | true | none | User msisdn or email |
code | string | true | none | The otp code |
verificationId | string | true | none | Verification id |
Enumerated Values
Property | Value |
---|---|
to | any phone number, or email if supported |