Demo entry 6714176

test

   

Submitted by anonymous on Feb 12, 2018 at 07:14
Language: Java. Code size: 976 Bytes.

import com.kapark.cloud.domain.*;
import com.kapark.cloud.model.dto.*;
import com.kapark.cloud.model.response.PageResponse;
import com.kapark.cloud.service.ApplicationService;
import com.kapark.cloud.service.AuthService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * @author Lin Zehuan
 * @description 权限接口
 * @email lzh@kapark.cn
 * @date 2018/2/2 10:10
 */

@RestController
public class AuthController {

    @Autowired
    private AuthService authService;

    @ApiOperation("权限验证")
    @PostMapping("/oauth/valid")
    public AuthInfo authInfo(@RequestBody ValidInfo dto){
        AuthInfo authInfo = new AuthInfo();
        authInfo.setUid("1");
        authInfo.setValid(true);
        authInfo.setRole("C");
        return authInfo;
    }
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).