Files
discogs-service/docs/data/documentation/discogsservice/apiprotocol/postaccesstoken(_:).json
T
javier 39e9dc5d53 Fox to Authentication endpoints (#10)
This PR contains the rock done to securize the /GET `/oauth/identity` endpoints on the OpenAPI specification document, plus it also improves the endpoints ordering in the *Database* section.

Reviewed-on: #10
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-13 18:41:24 +00:00

1 line
20 KiB
JSON

{"seeAlsoSections":[{"anchor":"Authentication-endpoints","title":"Authentication endpoints","identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getRequestToken(_:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getRequestToken(headers:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/postAccessToken(headers:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getUserIdentity(_:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getUserIdentity(headers:)"],"generated":true}],"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"postAccessToken"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"input"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken"},{"kind":"text","text":"."},{"text":"Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"PostAccessToken","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"text":".","kind":"text"},{"text":"Output","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Output","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"text":"Discussion","anchor":"discussion","type":"heading","level":2},{"inlineContent":[{"type":"text","text":"Provide to the service some required credentials details to obtain an access token at the end of the "},{"type":"emphasis","inlineContent":[{"text":"OAuth","type":"text"}]},{"type":"text","text":" process."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"This endpoint represents the "},{"identifier":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url","type":"reference","isActive":true},{"type":"text","text":", thus it requires to configure an "},{"type":"emphasis","inlineContent":[{"text":"Authorization","type":"text"}]},{"type":"text","text":" header to have a value like this:"}],"type":"paragraph"},{"syntax":null,"type":"codeListing","code":["OAuth oauth_consumer_key=\"your_consumer_key\", oauth_nonce=\"random_string_or_timestamp\", oauth_token=\"oauth_token_received_from_step_2\" oauth_signature=\"your_consumer_secret&\", oauth_signature_method=\"PLAINTEXT\", oauth_timestamp=\"current_timestamp\", oauth_verifier=\"users_verifier\""]},{"inlineContent":[{"type":"text","text":"For further details about this process, please refer to the "},{"identifier":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","type":"reference","isActive":true},{"type":"text","text":" section in the "},{"identifier":"https:\/\/www.discogs.com\/developers#page:authentication","type":"reference","isActive":true},{"type":"text","text":" documentation."}],"type":"paragraph"},{"name":"Remark","style":"note","type":"aside","content":[{"type":"paragraph","inlineContent":[{"text":"HTTP ","type":"text"},{"type":"codeVoice","code":"POST \/oauth\/access_token"},{"text":".","type":"text"}]}]},{"name":"Remark","style":"note","type":"aside","content":[{"type":"paragraph","inlineContent":[{"text":"Generated from ","type":"text"},{"type":"codeVoice","code":"#\/paths\/\/oauth\/access_token\/post(postAccessToken)"},{"text":".","type":"text"}]}]}],"kind":"content"}],"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/postAccessToken(_:)","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/discogsservice\/apiprotocol\/postaccesstoken(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol"]]},"sections":[],"metadata":{"modules":[{"name":"DiscogsService"}],"symbolKind":"method","title":"postAccessToken(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"postAccessToken"},{"kind":"text","text":"("},{"preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","kind":"typeIdentifier","text":"PostAccessToken"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV","kind":"typeIdentifier","text":"Input"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","kind":"typeIdentifier","text":"PostAccessToken"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","kind":"typeIdentifier","text":"Output"}],"required":true,"roleHeading":"Instance Method","externalID":"s:14DiscogsService11APIProtocolP15postAccessTokenyAA10OperationsO04PosteF0O6OutputOAH5InputVYaKF","role":"symbol"},"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","abstract":[{"type":"text","text":"Provide required credentials data to obtain an access token."}],"references":{"doc://DiscogsService/documentation/DiscogsService/APIProtocol/postAccessToken(headers:)":{"url":"\/documentation\/discogsservice\/apiprotocol\/postaccesstoken(headers:)","role":"symbol","title":"postAccessToken(headers:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/postAccessToken(headers:)","abstract":[{"type":"text","text":"Provide required credentials data to obtain an access token."}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"postAccessToken"},{"kind":"text","text":"("},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV","text":"Input"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV7HeadersV","text":"Headers"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","text":"Output"}],"kind":"symbol","type":"topic"},"https://www.discogs.com/developers#page:authentication":{"url":"https:\/\/www.discogs.com\/developers#page:authentication","type":"link","identifier":"https:\/\/www.discogs.com\/developers#page:authentication","title":"Discogs API authentication","titleInlineContent":[{"text":"Discogs API authentication","type":"text"}]},"doc://DiscogsService/documentation/DiscogsService/APIProtocol/getUserIdentity(headers:)":{"url":"\/documentation\/discogsservice\/apiprotocol\/getuseridentity(headers:)","role":"symbol","title":"getUserIdentity(headers:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getUserIdentity(headers:)","abstract":[{"type":"text","text":"Get information about an authenticated user."}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getUserIdentity"},{"kind":"text","text":"("},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO","text":"GetUserIdentity"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV","text":"Input"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV7HeadersV","text":"Headers"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO","text":"GetUserIdentity"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO6OutputO","text":"Output"}],"kind":"symbol","type":"topic"},"https://www.discogs.com/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url":{"url":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url","type":"link","identifier":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url","title":"4th step of the OAuth flow process","titleInlineContent":[{"text":"4th step of the OAuth flow process","type":"text"}]},"doc://DiscogsService/documentation/DiscogsService/APIProtocol":{"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"APIProtocol","kind":"identifier"}],"title":"APIProtocol","navigatorTitle":[{"text":"APIProtocol","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol","kind":"symbol","abstract":[{"type":"text","text":"A type that performs HTTP operations defined by the OpenAPI document."}],"url":"\/documentation\/discogsservice\/apiprotocol","role":"symbol","type":"topic"},"doc://DiscogsService/documentation/DiscogsService/APIProtocol/getRequestToken(headers:)":{"url":"\/documentation\/discogsservice\/apiprotocol\/getrequesttoken(headers:)","role":"symbol","title":"getRequestToken(headers:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getRequestToken(headers:)","abstract":[{"type":"text","text":"Get details about a OAuth request token."}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getRequestToken"},{"kind":"text","text":"("},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO","text":"GetRequestToken"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO5InputV","text":"Input"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO5InputV7HeadersV","text":"Headers"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO","text":"GetRequestToken"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO6OutputO","text":"Output"}],"kind":"symbol","type":"topic"},"doc://DiscogsService/documentation/DiscogsService/APIProtocol/postAccessToken(_:)":{"role":"symbol","type":"topic","required":true,"abstract":[{"text":"Provide required credentials data to obtain an access token.","type":"text"}],"kind":"symbol","title":"postAccessToken(_:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/postAccessToken(_:)","url":"\/documentation\/discogsservice\/apiprotocol\/postaccesstoken(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"postAccessToken"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","kind":"typeIdentifier","text":"PostAccessToken"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV","kind":"typeIdentifier","text":"Input"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","text":"Output"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken/Input":{"title":"Operations.PostAccessToken.Input","kind":"symbol","abstract":[],"navigatorTitle":[{"text":"Input","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Input","kind":"identifier"}],"url":"\/documentation\/discogsservice\/operations\/postaccesstoken\/input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input","type":"topic","role":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken/Output":{"kind":"symbol","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Output","title":"Operations.PostAccessToken.Output","abstract":[],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"navigatorTitle":[{"text":"Output","kind":"identifier"}],"url":"\/documentation\/discogsservice\/operations\/postaccesstoken\/output","type":"topic"},"https://www.discogs.com/developers#page:authentication,header:authentication-oauth-flow":{"url":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","type":"link","identifier":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","title":"OAuth flow","titleInlineContent":[{"text":"OAuth flow","type":"text"}]},"doc://DiscogsService/documentation/DiscogsService":{"type":"topic","role":"collection","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService","title":"DiscogsService","abstract":[],"url":"\/documentation\/discogsservice","kind":"symbol"},"doc://DiscogsService/documentation/DiscogsService/APIProtocol/getUserIdentity(_:)":{"role":"symbol","type":"topic","required":true,"abstract":[{"type":"text","text":"Get information about an authenticated user."}],"kind":"symbol","title":"getUserIdentity(_:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getUserIdentity(_:)","url":"\/documentation\/discogsservice\/apiprotocol\/getuseridentity(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getUserIdentity"},{"kind":"text","text":"("},{"preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO","kind":"typeIdentifier","text":"GetUserIdentity"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV","kind":"typeIdentifier","text":"Input"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO","text":"GetUserIdentity"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO6OutputO","text":"Output"}]},"doc://DiscogsService/documentation/DiscogsService/APIProtocol/getRequestToken(_:)":{"url":"\/documentation\/discogsservice\/apiprotocol\/getrequesttoken(_:)","role":"symbol","title":"getRequestToken(_:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getRequestToken(_:)","abstract":[{"type":"text","text":"Get details about a OAuth request token."}],"required":true,"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getRequestToken"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO","text":"GetRequestToken"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO5InputV","text":"Input"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO","text":"GetRequestToken"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO6OutputO","text":"Output"}],"kind":"symbol","type":"topic"},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken":{"title":"Operations.PostAccessToken","kind":"symbol","abstract":[{"text":"Provide required credentials data to obtain an access token.","type":"text"}],"navigatorTitle":[{"text":"PostAccessToken","kind":"identifier"}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"PostAccessToken","kind":"identifier"}],"url":"\/documentation\/discogsservice\/operations\/postaccesstoken","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken","type":"topic","role":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Operations":{"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Operations","kind":"identifier"}],"title":"Operations","navigatorTitle":[{"text":"Operations","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","kind":"symbol","url":"\/documentation\/discogsservice\/operations","abstract":[{"text":"API operations, with input and output types, generated from ","type":"text"},{"type":"codeVoice","code":"#\/paths"},{"text":" in the OpenAPI document.","type":"text"}],"role":"symbol","type":"topic"}}}