Files
discogs-service/docs/data/documentation/discogsservice/client/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
15 KiB
JSON

{"metadata":{"modules":[{"name":"DiscogsService"}],"title":"postAccessToken(_:)","roleHeading":"Instance Method","symbolKind":"method","externalID":"s:14DiscogsService6ClientV15postAccessTokenyAA10OperationsO04PosteF0O6OutputOAH5InputVYaKF","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"postAccessToken"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO"}],"role":"symbol"},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","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":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"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":"."},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Output"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"level":2,"anchor":"discussion","type":"heading","text":"Discussion"},{"type":"paragraph","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":[{"type":"text","text":"OAuth"}]},{"type":"text","text":" process."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This endpoint represents the "},{"type":"reference","identifier":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url","isActive":true},{"type":"text","text":", thus it requires to configure an "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Authorization"}]},{"type":"text","text":" header to have a value like this:"}]},{"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\""]},{"type":"paragraph","inlineContent":[{"type":"text","text":"For further details about this process, please refer to the "},{"type":"reference","identifier":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","isActive":true},{"type":"text","text":" section in the "},{"type":"reference","identifier":"https:\/\/www.discogs.com\/developers#page:authentication","isActive":true},{"type":"text","text":" documentation."}]},{"name":"Remark","type":"aside","style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"HTTP "},{"type":"codeVoice","code":"POST \/oauth\/access_token"},{"type":"text","text":"."}]}]},{"name":"Remark","type":"aside","style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Generated from "},{"type":"codeVoice","code":"#\/paths\/\/oauth\/access_token\/post(postAccessToken)"},{"type":"text","text":"."}]}]}],"kind":"content"}],"abstract":[{"type":"text","text":"Provide required credentials data to obtain an access token."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/client\/postaccesstoken(_:)"]}],"sections":[],"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/postAccessToken(_:)","interfaceLanguage":"swift"},"seeAlsoSections":[{"generated":true,"identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getRequestToken(_:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getUserIdentity(_:)"],"anchor":"Authentication-endpoints","title":"Authentication endpoints"}],"references":{"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/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/Client/postAccessToken(_:)":{"kind":"symbol","role":"symbol","title":"postAccessToken(_:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/postAccessToken(_:)","abstract":[{"text":"Provide required credentials data to obtain an access token.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"postAccessToken","kind":"identifier"},{"text":"(","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","kind":"typeIdentifier"}],"url":"\/documentation\/discogsservice\/client\/postaccesstoken(_:)","type":"topic"},"doc://DiscogsService/documentation/DiscogsService/Client":{"title":"Client","kind":"symbol","abstract":[{"type":"text","text":"The Discogs API v2.0 is a RESTful interface to Discogs data. You can access JSON-formatted information about Database objects such as "},{"type":"emphasis","inlineContent":[{"text":"Artists","type":"text"}]},{"type":"text","text":", "},{"type":"emphasis","inlineContent":[{"text":"Releases","type":"text"}]},{"type":"text","text":", and "},{"type":"emphasis","inlineContent":[{"text":"Labels","type":"text"}]},{"type":"text","text":". Your application can also manage "},{"type":"emphasis","inlineContent":[{"text":"User Collections","type":"text"}]},{"type":"text","text":" and "},{"type":"emphasis","inlineContent":[{"text":"Wantlists","type":"text"}]},{"type":"text","text":", create "},{"type":"emphasis","inlineContent":[{"text":"Marketplace","type":"text"}]},{"type":"text","text":" listings, and more."}],"navigatorTitle":[{"text":"Client","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Client","kind":"identifier"}],"url":"\/documentation\/discogsservice\/client","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client","type":"topic","role":"symbol"},"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/Client/getRequestToken(_:)":{"kind":"symbol","role":"symbol","title":"getRequestToken(_:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getRequestToken(_:)","abstract":[{"text":"Get details about a OAuth request token.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getRequestToken","kind":"identifier"},{"text":"(","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"GetRequestToken","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO5InputV","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"GetRequestToken","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO6OutputO","kind":"typeIdentifier"}],"url":"\/documentation\/discogsservice\/client\/getrequesttoken(_:)","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/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"},"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"},"doc://DiscogsService/documentation/DiscogsService/Client/getUserIdentity(_:)":{"kind":"symbol","role":"symbol","title":"getUserIdentity(_:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getUserIdentity(_:)","abstract":[{"text":"Get information about an authenticated user.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getUserIdentity","kind":"identifier"},{"text":"(","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"GetUserIdentity","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"GetUserIdentity","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO6OutputO","kind":"typeIdentifier"}],"url":"\/documentation\/discogsservice\/client\/getuseridentity(_:)","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"}]},"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"}]}}}