Class TokenController

java.lang.Object
com.plannaplan.controllers.TokenController

@RestController
@CrossOrigin
public class TokenController
extends java.lang.Object
Rest controller to Token related endpoints. More detailed api docs is available via swagger
  • Constructor Summary

    Constructors
    Constructor Description
    TokenController()  
  • Method Summary

    Modifier and Type Method Description
    org.springframework.http.ResponseEntity<TokenResponse> getRefreshToken​(java.lang.String refreshToken)  
    org.springframework.http.ResponseEntity<TokenResponse> getToken​(java.lang.String ticket)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TokenController

      public TokenController()
  • Method Details

    • getToken

      @GetMapping("/token") public org.springframework.http.ResponseEntity<TokenResponse> getToken​(@RequestParam("ticket") java.lang.String ticket)
      Parameters:
      ticket - via CAS obtained ticket - it's base to auth user
      Returns:
      TokenResponse if operation was success
    • getRefreshToken

      @GetMapping("/token/refresh") public org.springframework.http.ResponseEntity<TokenResponse> getRefreshToken​(@RequestParam("refreshToken") java.lang.String refreshToken) throws java.lang.NullPointerException
      Parameters:
      refreshToken - refresh token obtained via /token endpoint
      Returns:
      TokenResponse if operation was success
      Throws:
      java.lang.NullPointerException - is thrown if user was not found by refrshtoken