summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/cmcc/simulator/controller/AuthenticationController.java
blob: 0eb0b9b3b66af914492fecd7512c18fcccfc3812 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.cmcc.simulator.controller;

import java.util.UUID;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;

import com.cmcc.simulator.authmodule.AuthRequest;
import com.cmcc.simulator.authmodule.AuthResponse;

@RestController
@RequestMapping("/api/rest/securityManagement/v1")
public class AuthenticationController {

    @PostMapping("/oauth/token")
    @ResponseStatus(HttpStatus.OK)
    public AuthResponse nSSIChangeNotify(@RequestBody AuthRequest nSSIChangeNotify) { 	
        return new AuthResponse(UUID.randomUUID().toString().replaceAll("-",""), 1800);
    }

}