(ctx context.Context)
| 50 | const unauthenticated = "unauthenticated" |
| 51 | |
| 52 | func authTokenID(ctx context.Context) string { |
| 53 | if authValue := rpcmetadata.FromIncomingContext(ctx).AuthValue; authValue != "" { |
| 54 | _, id, _, err := auth.SplitToken(authValue) |
| 55 | if err != nil { |
| 56 | return unauthenticated |
| 57 | } |
| 58 | return id |
| 59 | } |
| 60 | return unauthenticated |
| 61 | } |
| 62 | |
| 63 | var pathTemplate = func(r *http.Request) (string, bool) { |
| 64 | route := mux.CurrentRoute(r) |
no test coverage detected