diff --git a/spec/json/twilio_oauth_v1.json b/spec/json/twilio_oauth_v1.json deleted file mode 100644 index ddb2807d..00000000 --- a/spec/json/twilio_oauth_v1.json +++ /dev/null @@ -1,681 +0,0 @@ -{ - "components": { - "securitySchemes": { - "accountSid_authToken": { - "scheme": "basic", - "type": "http" - } - }, - "schemas": { - "oauth.v1.certs": { - "type": "object", - "properties": { - "keys": { - "nullable": true, - "description": "A collection of certificates where are signed Twilio-issued tokens." - }, - "url": { - "type": "string", - "format": "uri", - "nullable": true - } - } - }, - "oauth.v1.device_code": { - "type": "object", - "properties": { - "device_code": { - "type": "string", - "nullable": true, - "description": "The device verification code." - }, - "user_code": { - "type": "string", - "nullable": true, - "description": "The verification code which end user uses to verify authorization request." - }, - "verification_uri": { - "type": "string", - "nullable": true, - "description": "The URI that the end user visits to verify authorization request." - }, - "verification_uri_complete": { - "type": "string", - "nullable": true, - "description": "The URI with user_code that the end-user alternatively visits to verify authorization request." - }, - "expires_in": { - "type": "integer", - "format": "int64", - "nullable": true, - "description": "The expiration time of the device_code and user_code in seconds." - }, - "interval": { - "type": "integer", - "nullable": true, - "description": "The minimum amount of time in seconds that the client should wait between polling requests to the token endpoint." - } - } - }, - "oauth.v1.openid_discovery": { - "type": "object", - "properties": { - "issuer": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "The URL of the party that will create the token and sign it with its private key." - }, - "authorization_endpoint": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "The endpoint that validates all authorization requests." - }, - "device_authorization_endpoint": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "The endpoint that validates all device code related authorization requests." - }, - "token_endpoint": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "The URL of the token endpoint. After a client has received an authorization code, that code is presented to the token endpoint and exchanged for an identity token, an access token, and a refresh token." - }, - "userinfo_endpoint": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "The URL of the user info endpoint, which returns user profile information to a client. Keep in mind that the user info endpoint returns only the information that has been requested." - }, - "revocation_endpoint": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "The endpoint used to revoke access or refresh tokens issued by the authorization server." - }, - "jwk_uri": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "The URL of your JSON Web Key Set. This set is a collection of JSON Web Keys, a standard method for representing cryptographic keys in a JSON structure." - }, - "response_type_supported": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true, - "description": "A collection of response type supported by authorization server." - }, - "subject_type_supported": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true, - "description": "A collection of subject by authorization server." - }, - "id_token_signing_alg_values_supported": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true, - "description": "A collection of JWS signing algorithms supported by authorization server to sign identity token." - }, - "scopes_supported": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true, - "description": "A collection of scopes supported by authorization server for identity token" - }, - "claims_supported": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true, - "description": "A collection of claims supported by authorization server for identity token" - }, - "url": { - "type": "string", - "format": "uri", - "nullable": true - } - } - }, - "oauth.v1.token": { - "type": "object", - "properties": { - "access_token": { - "type": "string", - "nullable": true, - "description": "Token which carries the necessary information to access a Twilio resource directly." - }, - "refresh_token": { - "type": "string", - "nullable": true, - "description": "Token which carries the information necessary to get a new access token." - }, - "id_token": { - "type": "string", - "nullable": true - }, - "refresh_token_expires_at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "The date and time in GMT when the refresh token expires in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." - }, - "access_token_expires_at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "The date and time in GMT when the refresh token expires in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." - } - } - }, - "oauth.v1.user_info": { - "type": "object", - "properties": { - "user_sid": { - "type": "string", - "minLength": 34, - "maxLength": 34, - "pattern": "^US[0-9a-fA-F]{32}$", - "nullable": true, - "description": "The URL of the party that will create the token and sign it with its private key." - }, - "first_name": { - "type": "string", - "nullable": true, - "description": "The first name of the end-user." - }, - "last_name": { - "type": "string", - "nullable": true, - "description": "The last name of the end-user." - }, - "friendly_name": { - "type": "string", - "nullable": true, - "description": "The friendly name of the end-user." - }, - "email": { - "type": "string", - "nullable": true, - "description": "The end-user's preferred email address." - }, - "url": { - "type": "string", - "format": "uri", - "nullable": true - } - } - } - } - }, - "info": { - "title": "Twilio - Oauth", - "description": "This is the public Twilio REST API.", - "termsOfService": "https://www.twilio.com/legal/tos", - "contact": { - "name": "Twilio Support", - "url": "https://support.twilio.com", - "email": "support@twilio.com" - }, - "license": { - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "version": "1.0.0" - }, - "openapi": "3.0.1", - "paths": { - "/v1/certs": { - "servers": [ - { - "url": "https://oauth.twilio.com" - } - ], - "description": "", - "x-twilio": { - "defaultOutputProperties": [ - "keys" - ], - "mountName": "oauth", - "pathType": "instance" - }, - "get": { - "description": "Fetches public JWKs", - "tags": [ - "OauthV1Oauth" - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/oauth.v1.certs" - }, - "examples": { - "fetch": { - "value": { - "keys": [ - { - "alg": "ES256", - "kid": "IC10c8172f35dd36f20d9ed2fcc0b818c7", - "key_ops": [], - "use": "sig", - "crv": "P-256", - "x": "hrJ4NKauVYBiREgIY_EPPj10zHIiOHeIf3-LGODt_KM", - "y": "c3IcyhpvfMIMpqd_ku9Q_4n20nMlelUF-zSmRXEIFEU", - "kty": "EC" - } - ], - "url": "https://oauth.twilio.com/v1/certs" - } - } - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "operationId": "FetchCerts" - } - }, - "/v1/device/code": { - "servers": [ - { - "url": "https://oauth.twilio.com" - } - ], - "description": "", - "x-twilio": { - "defaultOutputProperties": [ - "device_code", - "user_code", - "verification_uri", - "verification_uri_complete", - "expires_in", - "interval" - ], - "mountName": "device_code", - "pathType": "list" - }, - "post": { - "description": "Issues a new Access token (optionally identity_token & refresh_token) in exchange of Oauth grant", - "tags": [ - "OauthV1DeviceCode" - ], - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/oauth.v1.device_code" - }, - "examples": { - "create": { - "value": { - "device_code": "LiwuhE0bIhqemK6sd34tXfobVCR9yrk0", - "user_code": "Hkf1WaID3", - "verification_uri": "v1/oauth2/device/activate", - "verification_uri_complete": "v1/oauth2/device/activate?user_code=Hkf1WaID3", - "expires_in": 299, - "interval": 5 - } - } - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "operationId": "CreateDeviceCode", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "type": "object", - "title": "CreateDeviceCodeRequest", - "properties": { - "ClientSid": { - "type": "string", - "description": "A 34 character string that uniquely identifies this OAuth App." - }, - "Scopes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "An Array of scopes for authorization request" - }, - "Audiences": { - "type": "array", - "items": { - "type": "string" - }, - "description": "An array of intended audiences for token requests" - } - }, - "required": [ - "ClientSid", - "Scopes" - ] - }, - "examples": { - "create": { - "value": { - "ClientSid": "OQ693217fa7610373e7762f06645058bac", - "Scopes": [ - "test-scope" - ], - "Audiences": [ - "http://dev.twilio.com/" - ] - } - } - } - } - } - } - } - }, - "/v1/.well-known/openid-configuration": { - "servers": [ - { - "url": "https://oauth.twilio.com" - } - ], - "description": "", - "x-twilio": { - "defaultOutputProperties": [ - "issuer", - "authorization_endpoint", - "device_authorization_endpoint", - "token_endpoint", - "userinfo_endpoint", - "revocation_endpoint", - "jwk_uri", - "response_type_supported", - "subject_type_supported", - "id_token_signing_alg_values_supported", - "scopes_supported", - "claims_supported" - ], - "mountName": "openid_discovery", - "pathType": "instance" - }, - "get": { - "description": "Fetch configuration details about the OpenID Connect Authorization Server", - "tags": [ - "OauthV1OpenidDiscovery" - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/oauth.v1.openid_discovery" - }, - "examples": { - "fetch": { - "value": { - "issuer": "https://iam.twilio.com", - "authorization_endpoint": "https://oauth.twilio.com/oauth2/authorize", - "device_authorization_endpoint": "https://oauth.twilio.com/oauth2/device/authorize", - "token_endpoint": "https://oauth.twilio.com/oauth2/token", - "userinfo_endpoint": "https://oauth.twilio.com/oauth2/userinfo", - "revocation_endpoint": "https://oauth.twilio.com/oauth2/revoke", - "jwk_uri": "https://oauth.twilio.com/oauth2/certs", - "response_type_supported": [ - "code", - "token" - ], - "subject_type_supported": [ - "account_sid", - "user_sid" - ], - "id_token_signing_alg_values_supported": [ - "ECDSA", - "RSA256" - ], - "scopes_supported": [ - "openid", - "profile", - "email" - ], - "claims_supported": [ - "act", - "aud", - "cid", - "device_id", - "exp", - "jti", - "iat", - "iss", - "nbf", - "scp", - "sub" - ], - "url": "https://oauth.twilio.com/v1/.well-known/openid-configuration" - } - } - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "operationId": "FetchOpenidDiscovery" - } - }, - "/v1/token": { - "servers": [ - { - "url": "https://oauth.twilio.com" - } - ], - "description": "", - "x-twilio": { - "defaultOutputProperties": [ - "access_token", - "access_token_expires_at" - ], - "pathType": "list" - }, - "post": { - "description": "Issues a new Access token (optionally identity_token & refresh_token) in exchange of Oauth grant", - "tags": [ - "OauthV1Token" - ], - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/oauth.v1.token" - }, - "examples": { - "create": { - "value": { - "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", - "refresh_token": "ghjbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", - "id_token": "eyJhbdGciOiIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", - "refresh_token_expires_at": "2015-07-31T04:00:00Z", - "access_token_expires_at": "2015-07-31T04:00:00Z" - } - } - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "operationId": "CreateToken", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "type": "object", - "title": "CreateTokenRequest", - "properties": { - "GrantType": { - "type": "string", - "description": "Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token." - }, - "ClientSid": { - "type": "string", - "description": "A 34 character string that uniquely identifies this OAuth App." - }, - "ClientSecret": { - "type": "string", - "description": "The credential for confidential OAuth App." - }, - "Code": { - "type": "string", - "description": "JWT token related to the authorization code grant type." - }, - "CodeVerifier": { - "type": "string", - "description": "A code which is generation cryptographically." - }, - "DeviceCode": { - "type": "string", - "description": "JWT token related to the device code grant type." - }, - "RefreshToken": { - "type": "string", - "description": "JWT token related to the refresh token grant type." - }, - "DeviceId": { - "type": "string", - "description": "The Id of the device associated with the token (refresh token)." - } - }, - "required": [ - "GrantType", - "ClientSid" - ] - }, - "examples": { - "create": { - "value": { - "GrantType": "authorization_code", - "ClientSid": "OQ09708361261756db8c0b555d36f55a65", - "ClientSecret": "client_secret", - "Code": "dfyguyhuijikokje456rt7y8uioklj", - "CodeVerifier": "code_verifier", - "DeviceCode": "device_code", - "RefreshToken": "refresh_token", - "DeviceId": "device_id" - } - } - } - } - } - } - } - }, - "/v1/userinfo": { - "servers": [ - { - "url": "https://oauth.twilio.com" - } - ], - "description": "", - "x-twilio": { - "defaultOutputProperties": [ - "user_sid" - ], - "mountName": "user_info", - "pathType": "instance" - }, - "get": { - "description": "Retrieves the consented UserInfo and other claims about the logged-in subject (end-user).", - "tags": [ - "OauthV1UserInfo" - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/oauth.v1.user_info" - }, - "examples": { - "fetch": { - "value": { - "user_sid": "US57cc2449f1b38ed85cf1a43cd8166349", - "first_name": "Mafalda", - "last_name": "Rolfson", - "friendly_name": "mafalda.rolfson+oBgz@ct.sink.twilio.com", - "email": "mafalda.rolfson+oBgz@ct.sink.twilio.com", - "url": "https://oauth.twilio.com/v1/userinfo" - } - } - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "operationId": "FetchUserInfo" - } - } - }, - "servers": [ - { - "url": "https://oauth.twilio.com" - } - ], - "tags": [ - { - "name": "OauthV1DeviceCode" - }, - { - "name": "OauthV1Oauth" - }, - { - "name": "OauthV1OpenidDiscovery" - }, - { - "name": "OauthV1Token" - }, - { - "name": "OauthV1UserInfo" - } - ] -} \ No newline at end of file diff --git a/spec/yaml/twilio_oauth_v1.yaml b/spec/yaml/twilio_oauth_v1.yaml deleted file mode 100644 index 0c9e1e96..00000000 --- a/spec/yaml/twilio_oauth_v1.yaml +++ /dev/null @@ -1,503 +0,0 @@ -components: - securitySchemes: - accountSid_authToken: - scheme: basic - type: http - schemas: - oauth.v1.certs: - type: object - properties: - keys: - nullable: true - description: A collection of certificates where are signed Twilio-issued - tokens. - url: - type: string - format: uri - nullable: true - oauth.v1.device_code: - type: object - properties: - device_code: - type: string - nullable: true - description: The device verification code. - user_code: - type: string - nullable: true - description: The verification code which end user uses to verify authorization - request. - verification_uri: - type: string - nullable: true - description: The URI that the end user visits to verify authorization request. - verification_uri_complete: - type: string - nullable: true - description: The URI with user_code that the end-user alternatively visits - to verify authorization request. - expires_in: - type: integer - format: int64 - nullable: true - description: The expiration time of the device_code and user_code in seconds. - interval: - type: integer - nullable: true - description: The minimum amount of time in seconds that the client should - wait between polling requests to the token endpoint. - oauth.v1.openid_discovery: - type: object - properties: - issuer: - type: string - format: uri - nullable: true - description: The URL of the party that will create the token and sign it - with its private key. - authorization_endpoint: - type: string - format: uri - nullable: true - description: The endpoint that validates all authorization requests. - device_authorization_endpoint: - type: string - format: uri - nullable: true - description: The endpoint that validates all device code related authorization - requests. - token_endpoint: - type: string - format: uri - nullable: true - description: The URL of the token endpoint. After a client has received - an authorization code, that code is presented to the token endpoint and - exchanged for an identity token, an access token, and a refresh token. - userinfo_endpoint: - type: string - format: uri - nullable: true - description: The URL of the user info endpoint, which returns user profile - information to a client. Keep in mind that the user info endpoint returns - only the information that has been requested. - revocation_endpoint: - type: string - format: uri - nullable: true - description: The endpoint used to revoke access or refresh tokens issued - by the authorization server. - jwk_uri: - type: string - format: uri - nullable: true - description: The URL of your JSON Web Key Set. This set is a collection - of JSON Web Keys, a standard method for representing cryptographic keys - in a JSON structure. - response_type_supported: - type: array - items: - type: string - nullable: true - description: A collection of response type supported by authorization server. - subject_type_supported: - type: array - items: - type: string - nullable: true - description: A collection of subject by authorization server. - id_token_signing_alg_values_supported: - type: array - items: - type: string - nullable: true - description: A collection of JWS signing algorithms supported by authorization - server to sign identity token. - scopes_supported: - type: array - items: - type: string - nullable: true - description: A collection of scopes supported by authorization server for - identity token - claims_supported: - type: array - items: - type: string - nullable: true - description: A collection of claims supported by authorization server for - identity token - url: - type: string - format: uri - nullable: true - oauth.v1.token: - type: object - properties: - access_token: - type: string - nullable: true - description: Token which carries the necessary information to access a Twilio - resource directly. - refresh_token: - type: string - nullable: true - description: Token which carries the information necessary to get a new - access token. - id_token: - type: string - nullable: true - refresh_token_expires_at: - type: string - format: date-time - nullable: true - description: The date and time in GMT when the refresh token expires in - [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. - access_token_expires_at: - type: string - format: date-time - nullable: true - description: The date and time in GMT when the refresh token expires in - [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. - oauth.v1.user_info: - type: object - properties: - user_sid: - type: string - minLength: 34 - maxLength: 34 - pattern: ^US[0-9a-fA-F]{32}$ - nullable: true - description: The URL of the party that will create the token and sign it - with its private key. - first_name: - type: string - nullable: true - description: The first name of the end-user. - last_name: - type: string - nullable: true - description: The last name of the end-user. - friendly_name: - type: string - nullable: true - description: The friendly name of the end-user. - email: - type: string - nullable: true - description: The end-user's preferred email address. - url: - type: string - format: uri - nullable: true -info: - title: Twilio - Oauth - description: This is the public Twilio REST API. - termsOfService: https://www.twilio.com/legal/tos - contact: - name: Twilio Support - url: https://support.twilio.com - email: support@twilio.com - license: - name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - version: 1.0.0 -openapi: 3.0.1 -paths: - /v1/certs: - servers: - - url: https://oauth.twilio.com - description: '' - x-twilio: - defaultOutputProperties: - - keys - mountName: oauth - pathType: instance - get: - description: Fetches public JWKs - tags: - - OauthV1Oauth - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/oauth.v1.certs' - examples: - fetch: - value: - keys: - - alg: ES256 - kid: IC10c8172f35dd36f20d9ed2fcc0b818c7 - key_ops: [] - use: sig - crv: P-256 - x: hrJ4NKauVYBiREgIY_EPPj10zHIiOHeIf3-LGODt_KM - y: c3IcyhpvfMIMpqd_ku9Q_4n20nMlelUF-zSmRXEIFEU - kty: EC - url: https://oauth.twilio.com/v1/certs - description: OK - security: - - accountSid_authToken: [] - operationId: FetchCerts - /v1/device/code: - servers: - - url: https://oauth.twilio.com - description: '' - x-twilio: - defaultOutputProperties: - - device_code - - user_code - - verification_uri - - verification_uri_complete - - expires_in - - interval - mountName: device_code - pathType: list - post: - description: Issues a new Access token (optionally identity_token & refresh_token) - in exchange of Oauth grant - tags: - - OauthV1DeviceCode - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/oauth.v1.device_code' - examples: - create: - value: - device_code: LiwuhE0bIhqemK6sd34tXfobVCR9yrk0 - user_code: Hkf1WaID3 - verification_uri: v1/oauth2/device/activate - verification_uri_complete: v1/oauth2/device/activate?user_code=Hkf1WaID3 - expires_in: 299 - interval: 5 - description: Created - security: - - accountSid_authToken: [] - operationId: CreateDeviceCode - requestBody: - content: - application/x-www-form-urlencoded: - schema: - type: object - title: CreateDeviceCodeRequest - properties: - ClientSid: - type: string - description: A 34 character string that uniquely identifies this - OAuth App. - Scopes: - type: array - items: - type: string - description: An Array of scopes for authorization request - Audiences: - type: array - items: - type: string - description: An array of intended audiences for token requests - required: - - ClientSid - - Scopes - examples: - create: - value: - ClientSid: OQ693217fa7610373e7762f06645058bac - Scopes: - - test-scope - Audiences: - - http://dev.twilio.com/ - /v1/.well-known/openid-configuration: - servers: - - url: https://oauth.twilio.com - description: '' - x-twilio: - defaultOutputProperties: - - issuer - - authorization_endpoint - - device_authorization_endpoint - - token_endpoint - - userinfo_endpoint - - revocation_endpoint - - jwk_uri - - response_type_supported - - subject_type_supported - - id_token_signing_alg_values_supported - - scopes_supported - - claims_supported - mountName: openid_discovery - pathType: instance - get: - description: Fetch configuration details about the OpenID Connect Authorization - Server - tags: - - OauthV1OpenidDiscovery - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/oauth.v1.openid_discovery' - examples: - fetch: - value: - issuer: https://iam.twilio.com - authorization_endpoint: https://oauth.twilio.com/oauth2/authorize - device_authorization_endpoint: https://oauth.twilio.com/oauth2/device/authorize - token_endpoint: https://oauth.twilio.com/oauth2/token - userinfo_endpoint: https://oauth.twilio.com/oauth2/userinfo - revocation_endpoint: https://oauth.twilio.com/oauth2/revoke - jwk_uri: https://oauth.twilio.com/oauth2/certs - response_type_supported: - - code - - token - subject_type_supported: - - account_sid - - user_sid - id_token_signing_alg_values_supported: - - ECDSA - - RSA256 - scopes_supported: - - openid - - profile - - email - claims_supported: - - act - - aud - - cid - - device_id - - exp - - jti - - iat - - iss - - nbf - - scp - - sub - url: https://oauth.twilio.com/v1/.well-known/openid-configuration - description: OK - security: - - accountSid_authToken: [] - operationId: FetchOpenidDiscovery - /v1/token: - servers: - - url: https://oauth.twilio.com - description: '' - x-twilio: - defaultOutputProperties: - - access_token - - access_token_expires_at - pathType: list - post: - description: Issues a new Access token (optionally identity_token & refresh_token) - in exchange of Oauth grant - tags: - - OauthV1Token - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/oauth.v1.token' - examples: - create: - value: - access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c - refresh_token: ghjbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c - id_token: eyJhbdGciOiIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c - refresh_token_expires_at: '2015-07-31T04:00:00Z' - access_token_expires_at: '2015-07-31T04:00:00Z' - description: Created - security: - - accountSid_authToken: [] - operationId: CreateToken - requestBody: - content: - application/x-www-form-urlencoded: - schema: - type: object - title: CreateTokenRequest - properties: - GrantType: - type: string - description: Grant type is a credential representing resource owner's - authorization which can be used by client to obtain access token. - ClientSid: - type: string - description: A 34 character string that uniquely identifies this - OAuth App. - ClientSecret: - type: string - description: The credential for confidential OAuth App. - Code: - type: string - description: JWT token related to the authorization code grant type. - CodeVerifier: - type: string - description: A code which is generation cryptographically. - DeviceCode: - type: string - description: JWT token related to the device code grant type. - RefreshToken: - type: string - description: JWT token related to the refresh token grant type. - DeviceId: - type: string - description: The Id of the device associated with the token (refresh - token). - required: - - GrantType - - ClientSid - examples: - create: - value: - GrantType: authorization_code - ClientSid: OQ09708361261756db8c0b555d36f55a65 - ClientSecret: client_secret - Code: dfyguyhuijikokje456rt7y8uioklj - CodeVerifier: code_verifier - DeviceCode: device_code - RefreshToken: refresh_token - DeviceId: device_id - /v1/userinfo: - servers: - - url: https://oauth.twilio.com - description: '' - x-twilio: - defaultOutputProperties: - - user_sid - mountName: user_info - pathType: instance - get: - description: Retrieves the consented UserInfo and other claims about the logged-in - subject (end-user). - tags: - - OauthV1UserInfo - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/oauth.v1.user_info' - examples: - fetch: - value: - user_sid: US57cc2449f1b38ed85cf1a43cd8166349 - first_name: Mafalda - last_name: Rolfson - friendly_name: mafalda.rolfson+oBgz@ct.sink.twilio.com - email: mafalda.rolfson+oBgz@ct.sink.twilio.com - url: https://oauth.twilio.com/v1/userinfo - description: OK - security: - - accountSid_authToken: [] - operationId: FetchUserInfo -servers: -- url: https://oauth.twilio.com -tags: -- name: OauthV1DeviceCode -- name: OauthV1Oauth -- name: OauthV1OpenidDiscovery -- name: OauthV1Token -- name: OauthV1UserInfo