Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Commit

Permalink
Merge pull request #31 from jthiltges/vecresize
Browse files Browse the repository at this point in the history
Set allowed_issuers for scitoken_deserialize()
  • Loading branch information
djw8605 authored Aug 5, 2020
2 parents e97540d + 2194b08 commit f182e16
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/scitokens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -618,12 +618,10 @@ class XrdAccSciTokens : public XrdAccAuthorize
m_audiences_array[idx] = nullptr;

m_issuers = std::move(issuers);
m_valid_issuers.clear();
m_valid_issuers.reserve(m_issuers.size());
m_valid_issuers_array.resize(m_issuers.size() + 1);
idx = 0;
for (const auto &issuer : m_valid_issuers) {
m_valid_issuers_array[idx++] = issuer.c_str();
for (const auto &issuer : m_issuers) {
m_valid_issuers_array[idx++] = issuer.first.c_str();
}
m_valid_issuers_array[idx] = nullptr;
} catch (...) {
Expand Down Expand Up @@ -657,7 +655,6 @@ class XrdAccSciTokens : public XrdAccAuthorize
std::map<std::string, std::shared_ptr<XrdAccRules>> m_map;
std::unique_ptr<XrdAccAuthorize> m_chain;
const std::string m_parms;
std::vector<std::string> m_valid_issuers;
std::vector<const char*> m_valid_issuers_array;
std::unordered_map<std::string, IssuerConfig> m_issuers;
uint64_t m_next_clean{0};
Expand Down

0 comments on commit f182e16

Please sign in to comment.