feat: add customer authentication and scoped RBAC
This commit is contained in:
@@ -29,6 +29,9 @@ var vehicleProfileSourceSystemPattern = regexp.MustCompile(`^[a-z0-9][a-z0-9._:-
|
||||
|
||||
func (s *Service) VehicleProfile(ctx context.Context, vin string) (VehicleProfile, error) {
|
||||
vin = strings.TrimSpace(vin)
|
||||
if err := authorizeVehicleVIN(ctx, vin); err != nil {
|
||||
return VehicleProfile{}, err
|
||||
}
|
||||
if err := validateProfileVIN(vin); err != nil {
|
||||
return VehicleProfile{}, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user