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 @@
{"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/authtransport\/!=(_:_:)"]}],"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"internalParam","text":"lhs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"internalParam","text":"rhs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"parameters":[{"name":"lhs","content":[{"inlineContent":[{"type":"text","text":"A value to compare."}],"type":"paragraph"}]},{"name":"rhs","content":[{"inlineContent":[{"type":"text","text":"Another value to compare."}],"type":"paragraph"}]}],"kind":"parameters"},{"content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"inlineContent":[{"type":"text","text":"Inequality is the inverse of equality. For any values "},{"type":"codeVoice","code":"a"},{"type":"text","text":" and "},{"type":"codeVoice","code":"b"},{"type":"text","text":", "},{"type":"codeVoice","code":"a != b"},{"type":"text","text":" "},{"type":"text","text":"implies that "},{"type":"codeVoice","code":"a == b"},{"type":"text","text":" is "},{"type":"codeVoice","code":"false"},{"type":"text","text":"."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"This is the default implementation of the not-equal-to operator ("},{"type":"codeVoice","code":"!="},{"type":"text","text":")"},{"type":"text","text":" "},{"type":"text","text":"for any type that conforms to "},{"type":"codeVoice","code":"Equatable"},{"type":"text","text":"."}],"type":"paragraph"}],"kind":"content"}],"metadata":{"roleHeading":"Operator","role":"symbol","externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:14DiscogsService13AuthTransportO","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"!=","kind":"identifier"},{"text":" ","kind":"text"},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"title":"!=(_:_:)","extendedModule":"Swift","modules":[{"relatedModules":["Swift"],"name":"DiscogsService"}],"symbolKind":"op"},"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport\/!=(_:_:)","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"kind":"symbol","abstract":[{"text":"Returns a Boolean value indicating whether two values are not equal.","type":"text"}],"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/!=(_:_:)":{"kind":"symbol","role":"symbol","url":"\/documentation\/discogsservice\/authtransport\/!=(_:_:)","title":"!=(_:_:)","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"!=","kind":"identifier"},{"text":" ","kind":"text"},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"abstract":[{"text":"Returns a Boolean value indicating whether two values are not equal.","type":"text"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport\/!=(_:_:)","type":"topic"}}}