@Requires(property="micronaut.security.endpoints.oauth.enabled",value="true") @Requires(beans=RefreshTokenPersistence.class) @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,
RefreshTokenPersistence refreshTokenPersistence,
RefreshTokenValidator refreshTokenValidator) |
| 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, RefreshTokenPersistence refreshTokenPersistence, RefreshTokenValidator refreshTokenValidator)
tokenValidator - The token validatoraccessRefreshTokenGenerator - The access refresh token generatorrefreshTokenPersistence - The persistence mechanism for the refresh tokenrefreshTokenValidator - The refresh token validator@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