feat: add device authentication, place gates support, and PiP navigation features
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { Controller, Post, Body, HttpCode, HttpStatus } from '@nestjs/common';
|
||||
import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';
|
||||
import { AuthService } from './auth.service';
|
||||
import { ProvisionDeviceKeyDto } from './dto/provision-device-key.dto';
|
||||
|
||||
@ApiTags('auth')
|
||||
@Controller('auth')
|
||||
export class DeviceAuthController {
|
||||
constructor(private readonly authService: AuthService) {}
|
||||
|
||||
@Post('device-provision')
|
||||
@HttpCode(HttpStatus.OK)
|
||||
@ApiOperation({
|
||||
summary: 'Provision or retrieve a dedicated API key for a mobile device via hardware fingerprint',
|
||||
description: 'Enables completely frictionless, zero-OTP mobile onboarding by issuing an isolated consumer API key tied directly to physical device telemetry.',
|
||||
})
|
||||
@ApiResponse({ status: 200, description: 'Dedicated device API key issued successfully' })
|
||||
async provisionDeviceKey(@Body() dto: ProvisionDeviceKeyDto) {
|
||||
return this.authService.getOrProvisionDeviceKey(dto);
|
||||
}
|
||||
|
||||
@Post('device-key')
|
||||
@HttpCode(HttpStatus.OK)
|
||||
@ApiOperation({ summary: 'Intuitive alias for device-provision' })
|
||||
async getDeviceKey(@Body() dto: ProvisionDeviceKeyDto) {
|
||||
return this.authService.getOrProvisionDeviceKey(dto);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user