9a30b69561
This PR contains the work done to implement the *Authentication* endpoints of the Discogs API: * GET `/oauth/request_token` * POST `/oauth/access_token` * GET `/oauth/identity` Reviewed-on: #9 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
1 line
3.1 KiB
JSON
1 line
3.1 KiB
JSON
{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"onHeader"}]}]},{"content":[{"anchor":"discussion","text":"Discussion","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"This means that the header will be added to any existing header in a request, like this:"}]},{"syntax":"bash","code":["curl \"https:\/\/api.discogs.com\/database\/search?q=Slayer\" -H \"Authorization: Discogs key=foo123, secret=bar456\"","curl \"https:\/\/api.discogs.com\/database\/search?q=Slayer\" -H \"Authorization: Discogs token=abcxyz123456\""],"type":"codeListing"}],"kind":"content"}],"abstract":[{"text":"Authentication credential are sent in a request as an ","type":"text"},{"code":"Authentication","type":"codeVoice"},{"text":" header.","type":"text"}],"variants":[{"paths":["\/documentation\/discogsservice\/authtransport\/onheader"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"title":"AuthTransport.onHeader","modules":[{"name":"DiscogsService"}],"role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"onHeader"}],"symbolKind":"case","roleHeading":"Case","externalID":"s:14DiscogsService13AuthTransportO8onHeaderyA2CmF"},"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport\/onHeader","interfaceLanguage":"swift"},"references":{"doc://DiscogsService/documentation/DiscogsService/AuthTransport":{"url":"\/documentation\/discogsservice\/authtransport","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport","abstract":[{"type":"text","text":"A representation of the available transport options to send credentials in authenticated requests."}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AuthTransport","kind":"identifier"}],"kind":"symbol","type":"topic","title":"AuthTransport","navigatorTitle":[{"text":"AuthTransport","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService":{"title":"DiscogsService","abstract":[],"role":"collection","type":"topic","kind":"symbol","url":"\/documentation\/discogsservice","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService"},"doc://DiscogsService/documentation/DiscogsService/AuthTransport/onHeader":{"url":"\/documentation\/discogsservice\/authtransport\/onheader","kind":"symbol","role":"symbol","type":"topic","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onHeader","kind":"identifier"}],"abstract":[{"type":"text","text":"Authentication credential are sent in a request as an "},{"type":"codeVoice","code":"Authentication"},{"type":"text","text":" header."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport\/onHeader","title":"AuthTransport.onHeader"}}} |