{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/authtransport\/onheader"]}],"sections":[],"schemaVersion":{"major":0,"patch":0,"minor":3},"abstract":[{"text":"Authentication credential are sent in a request as an ","type":"text"},{"code":"Authentication","type":"codeVoice"},{"text":" header.","type":"text"}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"onHeader","kind":"identifier"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"text":"Discussion","anchor":"discussion","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"text":"This means that the header will be added to any existing header in a request, like this:","type":"text"}]},{"type":"codeListing","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\""]}]}],"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport\/onHeader","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport"]]},"metadata":{"modules":[{"name":"DiscogsService"}],"symbolKind":"case","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"onHeader","kind":"identifier"}],"role":"symbol","externalID":"s:14DiscogsService13AuthTransportO8onHeaderyA2CmF","title":"AuthTransport.onHeader","roleHeading":"Case"},"references":{"doc://DiscogsService/documentation/DiscogsService":{"url":"\/documentation\/discogsservice","abstract":[],"kind":"symbol","type":"topic","title":"DiscogsService","role":"collection","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService"},"doc://DiscogsService/documentation/DiscogsService/AuthTransport":{"fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"AuthTransport"}],"title":"AuthTransport","abstract":[{"type":"text","text":"A representation of the available transport options to send credentials in authenticated requests."}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"AuthTransport"}],"type":"topic","url":"\/documentation\/discogsservice\/authtransport"},"doc://DiscogsService/documentation/DiscogsService/AuthTransport/onHeader":{"kind":"symbol","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onHeader","kind":"identifier"}],"type":"topic","url":"\/documentation\/discogsservice\/authtransport\/onheader","title":"AuthTransport.onHeader","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport\/onHeader","abstract":[{"type":"text","text":"Authentication credential are sent in a request as an "},{"type":"codeVoice","code":"Authentication"},{"type":"text","text":" header."}],"role":"symbol"}}}