MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / findAuthorization

Method findAuthorization

Libraries/HttpClient/HttpClientSession.cpp:694–712  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

692}
693
694bool SC::HttpClientSession::findAuthorization(StringSpan origin, StringSpan& authorizationHeader) const
695{
696 authorizationHeader = {};
697 if (not initialized)
698 {
699 return false;
700 }
701
702 for (size_t idx = 0; idx < sessionMemory.authEntries.sizeInElements(); ++idx)
703 {
704 const HttpClientSessionAuthCacheEntry& entry = sessionMemory.authEntries[idx];
705 if (entry.isInUse() and sessionAsciiEqualsIgnoreCase(entry.origin, origin))
706 {
707 authorizationHeader = entry.authorizationHeader;
708 return true;
709 }
710 }
711 return false;
712}
713
714bool SC::HttpClientSession::hasAuthorization(StringSpan origin) const
715{

Callers 1

sessionLayerMethod · 0.80

Calls 1

Tested by 1

sessionLayerMethod · 0.64