forked from TrueCloudLab/certificates
Fix spelling errors.
This commit is contained in:
parent
b88a2f1373
commit
8f8c862c04
4 changed files with 6 additions and 6 deletions
|
@ -116,8 +116,8 @@ type awsInstanceIdentityDocument struct {
|
|||
// with the same instance will be accepted. By default only the first request
|
||||
// will be accepted.
|
||||
//
|
||||
// If InstanceAge is set, only the instances with an pendingTime within the
|
||||
// given period will be accepted.
|
||||
// If InstanceAge is set, only the instances with a pendingTime within the given
|
||||
// period will be accepted.
|
||||
//
|
||||
// Amazon Identity docs are available at
|
||||
// https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html
|
||||
|
|
|
@ -77,7 +77,7 @@ func (c *Collection) LoadByToken(token *jose.JSONWebToken, claims *jose.Claims)
|
|||
|
||||
// match with server audiences
|
||||
if matchesAudience(claims.Audience, audiences) {
|
||||
// Use fragment to get audiences (GCP, AWS)
|
||||
// Use fragment to get provisioner name (GCP, AWS)
|
||||
if fragment != "" {
|
||||
return c.Load(fragment)
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ func stripPort(rawurl string) string {
|
|||
return u.String()
|
||||
}
|
||||
|
||||
// extractFragment extracts the
|
||||
// extractFragment extracts the first fragment of an audience url.
|
||||
func extractFragment(audience []string) string {
|
||||
for _, s := range audience {
|
||||
if u, err := url.Parse(s); err == nil && u.Fragment != "" {
|
||||
|
|
|
@ -12,7 +12,7 @@ type Duration struct {
|
|||
time.Duration
|
||||
}
|
||||
|
||||
// NewDuration parses a duration string and returns a Duration type or and error
|
||||
// NewDuration parses a duration string and returns a Duration type or an error
|
||||
// if the given string is not a duration.
|
||||
func NewDuration(s string) (*Duration, error) {
|
||||
d, err := time.ParseDuration(s)
|
||||
|
|
|
@ -58,7 +58,7 @@ func (a Audiences) WithFragment(fragment string) Audiences {
|
|||
}
|
||||
|
||||
// generateSignAudience generates a sign audience with the format
|
||||
// https://<ca-url>/1.0/sign#provisionerID
|
||||
// https://<host>/1.0/sign#provisionerID
|
||||
func generateSignAudience(caURL string, provisionerID string) (string, error) {
|
||||
u, err := url.Parse(caURL)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue