Implemented the Authentication middleware (#3)

This PR contains the work done to implement the `AuthMiddleware` middleware, to authenticate the requests sent to the backend service, based on [their specifications](https://www.discogs.com/developers/#page:authentication).

In addition, some documentation has been added/updated and some boilerplate source code has been removed from the project.

Reviewed-on: #3
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
This commit was merged in pull request #3.
This commit is contained in:
2025-10-11 07:39:52 +00:00
committed by Javier Cicchelli
parent 428eedd89d
commit bfc9e67d38
1958 changed files with 2591 additions and 1926 deletions
@@ -0,0 +1 @@
{"abstract":[{"text":"Authentication credential are sent in a request as parameters in the query string.","type":"text"}],"variants":[{"paths":["\/documentation\/discogsservice\/authtransport\/onquery"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onQuery","kind":"identifier"}]}],"kind":"declarations"},{"content":[{"text":"Discussion","level":2,"anchor":"discussion","type":"heading"},{"type":"paragraph","inlineContent":[{"text":"This means that the parameters will be injected into the query in a request, like this:","type":"text"}]},{"syntax":"bash","type":"codeListing","code":["curl \"https:\/\/api.discogs.com\/database\/search?q=Slayer&key=foo123&secret=bar456\"","curl \"https:\/\/api.discogs.com\/database\/search?q=Slayer&token=abcxyz123456\""]}],"kind":"content"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"metadata":{"role":"symbol","roleHeading":"Case","symbolKind":"case","title":"AuthTransport.onQuery","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onQuery","kind":"identifier"}],"modules":[{"name":"DiscogsService"}],"externalID":"s:14DiscogsService13AuthTransportO7onQueryyA2CmF"},"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport\/onQuery","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport"]]},"kind":"symbol","sections":[],"references":{"doc://DiscogsService/documentation/DiscogsService":{"role":"collection","title":"DiscogsService","kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService","abstract":[],"type":"topic","url":"\/documentation\/discogsservice"},"doc://DiscogsService/documentation/DiscogsService/AuthTransport":{"role":"symbol","type":"topic","abstract":[{"text":"A representation of the available transport options to send credentials in authenticated requests.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport","url":"\/documentation\/discogsservice\/authtransport","navigatorTitle":[{"text":"AuthTransport","kind":"identifier"}],"title":"AuthTransport","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AuthTransport","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/AuthTransport/onQuery":{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport\/onQuery","role":"symbol","title":"AuthTransport.onQuery","url":"\/documentation\/discogsservice\/authtransport\/onquery","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onQuery","kind":"identifier"}],"abstract":[{"text":"Authentication credential are sent in a request as parameters in the query string.","type":"text"}],"kind":"symbol","type":"topic"}}}