forked from TrueCloudLab/certificates
Use proper context in authority package
This commit is contained in:
parent
539bfddba5
commit
94f5b92513
2 changed files with 3 additions and 2 deletions
|
@ -590,7 +590,7 @@ func (a *Authority) init() error {
|
|||
}
|
||||
|
||||
// Load Provisioners and Admins
|
||||
if err := a.ReloadAdminResources(context.Background()); err != nil {
|
||||
if err := a.ReloadAdminResources(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -253,7 +253,8 @@ func (a *Authority) authorizeSign(ctx context.Context, token string) ([]provisio
|
|||
//
|
||||
// Deprecated: Use Authorize(context.Context, string) ([]provisioner.SignOption, error).
|
||||
func (a *Authority) AuthorizeSign(token string) ([]provisioner.SignOption, error) {
|
||||
ctx := provisioner.NewContextWithMethod(context.Background(), provisioner.SignMethod)
|
||||
ctx := NewContext(context.Background(), a)
|
||||
ctx = provisioner.NewContextWithMethod(ctx, provisioner.SignMethod)
|
||||
return a.Authorize(ctx, token)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue