src/server/auth/server/api_server.go
func getAuthToken(ctx context.Context) (string, error) {
	md, ok := metadata.FromIncomingContext(ctx)
	if !ok {
		return "", authclient.ErrNoMetadata
	}
	if len(md[authclient.ContextTokenKey]) > 1 {
		return "", fmt.Errorf("multiple authentication token keys found in context")
	} else if len(md[authclient.ContextTokenKey]) == 0 {
		return "", authclient.ErrNotSignedIn
	}
	return md[authclient.ContextTokenKey][0], nil
}
func getAuthToken(ctx context.Context) (string, error) {
	md, ok := metadata.FromIncomingContext(ctx)
	if !ok {
		return "", authclient.ErrNoMetadata
	}
	if len(md[authclient.ContextTokenKey]) > 1 {
		return "", fmt.Errorf("multiple authentication token keys found in context")
	} else if len(md[authclient.ContextTokenKey]) == 0 {
		return "", authclient.ErrNotSignedIn
	}
	return md[authclient.ContextTokenKey][0], nil
}
// getAuthToken extracts the auth token embedded in 'ctx', if there is on