Tidying up auth (#1410)
* Don't clear auth rules if request fails * Add jitter to auth service loading rules * Remove unused error from ContextWithToken result Co-authored-by: Ben Toogood <ben@micro.mu>
This commit is contained in:
@@ -130,6 +130,6 @@ func ContextWithAccount(ctx context.Context, account *Account) (context.Context,
|
||||
}
|
||||
|
||||
// ContextWithToken sets the auth token in the context
|
||||
func ContextWithToken(ctx context.Context, token string) (context.Context, error) {
|
||||
return metadata.Set(ctx, "Authorization", fmt.Sprintf("%v%v", BearerScheme, token)), nil
|
||||
func ContextWithToken(ctx context.Context, token string) context.Context {
|
||||
return metadata.Set(ctx, "Authorization", fmt.Sprintf("%v%v", BearerScheme, token))
|
||||
}
|
||||
|
Reference in New Issue
Block a user