{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"text":"apiKey","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":")","kind":"text"}],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"apiKey","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"A Marvel API key."}]}]}]},{"kind":"content","content":[{"level":2,"type":"heading","anchor":"discussion","text":"Discussion"},{"type":"paragraph","inlineContent":[{"text":"The middleware attaches the required ","type":"text"},{"type":"codeVoice","code":"apikey"},{"text":" parameter to the URI path of the intercepted request.","type":"text"},{"text":" ","type":"text"},{"text":"This initializer should be used for client-side applications, as indicated in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"https:\/\/developer.marvel.com\/documentation\/authorization"}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware\/init(apiKey:)"},"abstract":[{"type":"text","text":"Initializes this middleware with an api key."}],"variants":[{"paths":["\/documentation\/marvelservice\/authmiddleware\/init(apikey:)"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/MarvelService\/documentation\/MarvelService","doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware"]]},"metadata":{"roleHeading":"Initializer","externalID":"s:13MarvelService14AuthMiddlewareV6apiKeyACSS_tcfc","role":"symbol","symbolKind":"init","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"apiKey","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":")","kind":"text"}],"title":"init(apiKey:)","modules":[{"name":"MarvelService"}]},"schemaVersion":{"minor":3,"major":0,"patch":0},"references":{"doc://MarvelService/documentation/MarvelService/AuthMiddleware":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AuthMiddleware"}],"role":"symbol","url":"\/documentation\/marvelservice\/authmiddleware","kind":"symbol","type":"topic","title":"AuthMiddleware","abstract":[{"type":"text","text":"A middleware that attaches the necessary authentication parameters to the path of the request."}],"identifier":"doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware","navigatorTitle":[{"kind":"identifier","text":"AuthMiddleware"}]},"doc://MarvelService/documentation/MarvelService":{"kind":"symbol","identifier":"doc:\/\/MarvelService\/documentation\/MarvelService","role":"collection","abstract":[{"type":"text","text":"A library that allows the developer to interact with the "},{"type":"strong","inlineContent":[{"type":"text","text":"Marvel Comics API"}]},{"type":"text","text":" backend service."}],"url":"\/documentation\/marvelservice","type":"topic","title":"MarvelService"},"https://developer.marvel.com/documentation/authorization":{"titleInlineContent":[{"type":"text","text":"Marvel API documentation"}],"url":"https:\/\/developer.marvel.com\/documentation\/authorization","identifier":"https:\/\/developer.marvel.com\/documentation\/authorization","title":"Marvel API documentation","type":"link"},"doc://MarvelService/documentation/MarvelService/AuthMiddleware/init(apiKey:)":{"url":"\/documentation\/marvelservice\/authmiddleware\/init(apikey:)","role":"symbol","identifier":"doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware\/init(apiKey:)","abstract":[{"type":"text","text":"Initializes this middleware with an api key."}],"fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"apiKey","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":")","kind":"text"}],"kind":"symbol","type":"topic","title":"init(apiKey:)"}}}