Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additionally allow suffix matching for cred lookup #642

Merged
merged 5 commits into from
Jul 17, 2018

Conversation

chanseokoh
Copy link
Member

Part of #586 (#586 (comment)).

Order of preference for finding a matching credential:

  1. Exact registry name
  2. https:// + registry name
  3. registry name + arbitrary suffix
  4. https:// registry name + arbitrary suffix

return registryAuth.auth;
}
return null;
Predicate<String> exactMatch = registry::equals;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on the ordering. The description in the PR should prob be added to this javadoc.

}

/** Returns {@link AuthTemplate} matching the given predicate. */
private AuthTemplate getAuthTemplate(Predicate<String> registryMatch) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe it makes sense to have this one below the other getAuthTemplate since that one calls this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants