| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| // It's essential that the ctx not be accessed when authentication |
| // is not requested. This is because the context initialization code |
| // uses an unauthenticated connection to obtain a principal! |
| func GetPrincipalVCOpts(ctx *context.T, opts ...VCOpt) security.Principal { |
| for _, opt := range opts { |
| return v23.GetPrincipal(ctx) |
| return v23.GetPrincipal(ctx) |
| func GetPrincipalListenerOpts(ctx *context.T, opts ...ListenerOpt) security.Principal { |
| for _, opt := range opts { |
| return v23.GetPrincipal(ctx) |
| return v23.GetPrincipal(ctx) |