@Requires(property="micronaut.security.endpoints.oauth.enabled", value="true") @Controller(value="${micronaut.security.endpoints.oauth.path:/oauth/access_token}") @Secured(value="isAnonymous()") @Validated public class OauthController extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected AccessRefreshTokenGenerator |
accessRefreshTokenGenerator |
protected TokenValidator |
tokenValidator |
Constructor and Description |
---|
OauthController(JwtTokenValidator tokenValidator,
AccessRefreshTokenGenerator accessRefreshTokenGenerator) |
Modifier and Type | Method and Description |
---|---|
io.reactivex.Single<io.micronaut.http.HttpResponse<AccessRefreshToken>> |
index(@Valid TokenRefreshRequest tokenRefreshRequest) |
protected final TokenValidator tokenValidator
protected final AccessRefreshTokenGenerator accessRefreshTokenGenerator
public OauthController(JwtTokenValidator tokenValidator, AccessRefreshTokenGenerator accessRefreshTokenGenerator)
tokenValidator
- An instance of TokenValidator
accessRefreshTokenGenerator
- An instance of AccessRefreshTokenGenerator
@Consumes(value={"application/x-www-form-urlencoded","application/json"}) @Post public io.reactivex.Single<io.micronaut.http.HttpResponse<AccessRefreshToken>> index(@Valid @Valid TokenRefreshRequest tokenRefreshRequest)
tokenRefreshRequest
- An instance of TokenRefreshRequest
present in the request