# auth pydantic_v2.BaseModel
redirects
  > GET https://api.example.com/api-key/header
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, x-api-key: key-secret] b''
  header key not redirected raw = ('returned', 302, 'https://other.example.com/api-key/header')
    unused=1
  > GET https://api.example.com/api-key/query?api_key=key-secret
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream] b''
  query key not redirected raw = ('returned', 307, 'https://other.example.com/q')
    unused=1
  > GET https://api.example.com/api-key/cookie
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, cookie: session_key=key-secret] b''
  cookie key not redirected raw = ('returned', 308, 'https://other.example.com/c')
    unused=1
  > GET https://api.example.com/anonymous
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, x-api-key: patched-secret] b''
  patched scheme header not redirected raw = ('returned', 302, 'https://other.example.com/anonymous')
    unused=1
  > GET https://api.example.com/api-key/header
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, x-api-key: key-secret] b''
  header key at its own origin not redirected raw = ('returned', 302, 'https://api.example.com/moved')
    unused=1
  > GET https://api.example.com/api-key/header
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, x-api-key: key-secret] b''
  SDK choice cannot redirect a header key raw = ('returned', 307, 'https://other.example.com/api-key/header')
    unused=1
  > GET https://api.example.com/bearer
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, authorization: Bearer token-secret] b''
  > GET https://other.example.com/b
    [host: other.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream] b''
  bearer redirected without Authorization raw = ('returned', 200, None)
    unused=0
  > GET https://api.example.com/bearer
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, authorization: Bearer token-secret] b''
  > GET https://api.example.com/b2
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, authorization: Bearer token-secret] b''
  bearer redirected within its origin raw = ('returned', 200, None)
    unused=0
  > GET https://api.example.com/anonymous
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream] b''
  > GET https://other.example.com/anonymous
    [host: other.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream] b''
  plain request inherits the client's redirects raw = ('returned', 200, None)
    unused=0
  > GET https://api.example.com/anonymous
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream] b''
  plain request on a client that follows none raw = ('returned', 302, 'https://other.example.com/anonymous')
    unused=1
  > GET https://api.example.com/anonymous
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream] b''
  > GET https://other.example.com/anonymous
    [host: other.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream] b''
  plain request the SDK redirects raw = ('returned', 200, None)
    unused=0
  > GET https://api.example.com/anonymous
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, x-caller-key: caller-secret] b''
  > GET https://other.example.com/
    [host: other.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, x-caller-key: caller-secret] b''
  caller's own Auth applied and redirected raw = ('returned', 200, None)
    unused=0
  > GET https://api.example.com/bearer
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, authorization: Bearer token-secret] b''
  > GET https://other.example.com/bearer
    [host: other.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream] b''
  bearer rejected by another origin ! AuthenticationError: Error code: 401 [operation_id='bearer', status_code=401, body=b'', body_bytes=b'', truncated=False, cause=DecodeError()]
  > GET https://api.example.com/api-key/header
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, x-api-key: key-secret] b''
  async header key not redirected = ('returned', 302, 'https://other.example.com/api-key/header')
    unused=1
  > GET https://api.example.com/api-key/query?api_key=key-secret
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream] b''
  async query key not redirected = ('returned', 307, 'https://other.example.com/q')
    unused=1
  > GET https://api.example.com/api-key/cookie
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, cookie: session_key=key-secret] b''
  async cookie key not redirected = ('returned', 308, 'https://other.example.com/c')
    unused=1
  > GET https://api.example.com/anonymous
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, x-api-key: patched-secret] b''
  async patched scheme header not redirected = ('returned', 302, 'https://other.example.com/anonymous')
    unused=1
  > GET https://api.example.com/api-key/header
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, x-api-key: key-secret] b''
  async header key at its own origin not redirected = ('returned', 302, 'https://api.example.com/moved')
    unused=1
  > GET https://api.example.com/api-key/header
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, x-api-key: key-secret] b''
  async SDK choice cannot redirect a header key = ('returned', 307, 'https://other.example.com/api-key/header')
    unused=1
  > GET https://api.example.com/bearer
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, authorization: Bearer token-secret] b''
  > GET https://other.example.com/b
    [host: other.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream] b''
  async bearer redirected without Authorization = ('returned', 200, None)
    unused=0
  > GET https://api.example.com/bearer
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, authorization: Bearer token-secret] b''
  > GET https://api.example.com/b2
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, authorization: Bearer token-secret] b''
  async bearer redirected within its origin = ('returned', 200, None)
    unused=0
  > GET https://api.example.com/anonymous
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream] b''
  > GET https://other.example.com/anonymous
    [host: other.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream] b''
  async plain request inherits the client's redirects = ('returned', 200, None)
    unused=0
  > GET https://api.example.com/anonymous
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream] b''
  async plain request on a client that follows none = ('returned', 302, 'https://other.example.com/anonymous')
    unused=1
  > GET https://api.example.com/anonymous
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream] b''
  > GET https://other.example.com/anonymous
    [host: other.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream] b''
  async plain request the SDK redirects = ('returned', 200, None)
    unused=0
  > GET https://api.example.com/anonymous
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, x-caller-key: caller-secret] b''
  > GET https://other.example.com/
    [host: other.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, x-caller-key: caller-secret] b''
  async caller's own Auth applied and redirected = ('returned', 200, None)
    unused=0
signing
  > PUT https://api.example.com/signed
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, content-type: application/octet-stream, content-length: 7, x-signature: fcc15d6ea9d47ea1] b'payload'
  signed bytes = b'ok'
  > PUT https://api.example.com/signed
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, content-type: application/octet-stream, content-length: 9, x-signature: 47071517fa70f5dc] b'file-body'
  signed file = b'ok'
  > PUT https://api.example.com/signed
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, content-type: application/octet-stream, transfer-encoding: chunked, x-signature: 8e7254d4e9ba6c3d] b'chunk-body'
  signed chunks = b'ok'
  > PUT https://api.example.com/signed
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, content-type: application/octet-stream, content-length: 7, x-signature: fcc15d6ea9d47ea1] b'payload'
  > PUT https://api.example.com/signed
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, content-type: application/octet-stream, content-length: 7, x-signature: fcc15d6ea9d47ea1] b'payload'
  signed retry = b'ok'
  > GET https://api.example.com/bearer
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, x-signature: 503473565ce46a21] b''
  signature replaces the credentials = b'ok'
  signatures ['7:fcc15d6ea9d47ea1', '9:47071517fa70f5dc', 'chunked:8e7254d4e9ba6c3d', '7:fcc15d6ea9d47ea1', '7:fcc15d6ea9d47ea1', 'chunked:503473565ce46a21']
  > PUT https://api.example.com/signed
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, content-type: application/octet-stream, content-length: 7, x-signature: fcc15d6ea9d47ea1] b'payload'
  async signed bytes = b'ok'
  > PUT https://api.example.com/signed
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/octet-stream, content-type: application/octet-stream, transfer-encoding: chunked, x-signature: 8e7254d4e9ba6c3d] b'chunk-body'
  async signed chunks = b'ok'
  async signatures ['7:fcc15d6ea9d47ea1', 'chunked:8e7254d4e9ba6c3d']
