/*
* Copyright 2014 Red Hat, Inc.
*
* Red Hat licenses this file to you under the Apache License, version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.vertx.reactivex.ext.auth.oauth2;
import io.vertx.reactivex.RxHelper;
import io.vertx.reactivex.ObservableHelper;
import io.vertx.reactivex.FlowableHelper;
import io.vertx.reactivex.impl.AsyncResultMaybe;
import io.vertx.reactivex.impl.AsyncResultSingle;
import io.vertx.reactivex.impl.AsyncResultCompletable;
import io.vertx.reactivex.WriteStreamObserver;
import io.vertx.reactivex.WriteStreamSubscriber;
import java.util.Map;
import java.util.Set;
import java.util.List;
import java.util.Iterator;
import java.util.function.Function;
import java.util.stream.Collectors;
import io.vertx.core.Handler;
import io.vertx.core.AsyncResult;
import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;
import io.vertx.lang.rx.RxGen;
import io.vertx.lang.rx.TypeArg;
import io.vertx.lang.rx.MappingIterator;
Factory interface for creating OAuth2 based AuthenticationProvider
instances. NOTE: This class has been automatically generated from the original
non RX-ified interface using Vert.x codegen. /**
* Factory interface for creating OAuth2 based {@link io.vertx.reactivex.ext.auth.authentication.AuthenticationProvider} instances.
*
* <p/>
* NOTE: This class has been automatically generated from the {@link io.vertx.ext.auth.oauth2.OAuth2Auth original} non RX-ified interface using Vert.x codegen.
*/
@RxGen(io.vertx.ext.auth.oauth2.OAuth2Auth.class)
public class OAuth2Auth extends io.vertx.reactivex.ext.auth.authentication.AuthenticationProvider {
@Override
public String toString() {
return delegate.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
OAuth2Auth that = (OAuth2Auth) o;
return delegate.equals(that.delegate);
}
@Override
public int hashCode() {
return delegate.hashCode();
}
public static final TypeArg<OAuth2Auth> __TYPE_ARG = new TypeArg<>( obj -> new OAuth2Auth((io.vertx.ext.auth.oauth2.OAuth2Auth) obj),
OAuth2Auth::getDelegate
);
private final io.vertx.ext.auth.oauth2.OAuth2Auth delegate;
public OAuth2Auth(io.vertx.ext.auth.oauth2.OAuth2Auth delegate) {
super(delegate);
this.delegate = delegate;
}
public OAuth2Auth(Object delegate) {
super((io.vertx.ext.auth.oauth2.OAuth2Auth)delegate);
this.delegate = (io.vertx.ext.auth.oauth2.OAuth2Auth)delegate;
}
public io.vertx.ext.auth.oauth2.OAuth2Auth getDelegate() {
return delegate;
}
Create a OAuth2 auth provider
Params: - vertx – the Vertx instance
Returns: the auth provider
/**
* Create a OAuth2 auth provider
* @param vertx the Vertx instance
* @return the auth provider
*/
public static io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth create(io.vertx.reactivex.core.Vertx vertx) {
io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth ret = io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth.newInstance((io.vertx.ext.auth.oauth2.OAuth2Auth)io.vertx.ext.auth.oauth2.OAuth2Auth.create(vertx.getDelegate()));
return ret;
}
Create a OAuth2 auth provider
Params: - vertx – the Vertx instance
- config – the config
Returns: the auth provider
/**
* Create a OAuth2 auth provider
* @param vertx the Vertx instance
* @param config the config
* @return the auth provider
*/
public static io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth create(io.vertx.reactivex.core.Vertx vertx, io.vertx.ext.auth.oauth2.OAuth2Options config) {
io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth ret = io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth.newInstance((io.vertx.ext.auth.oauth2.OAuth2Auth)io.vertx.ext.auth.oauth2.OAuth2Auth.create(vertx.getDelegate(), config));
return ret;
}
Retrieve the public server JSON Web Key (JWK) required to verify the authenticity
of issued ID and access tokens. The provider will refresh the keys according to:
https://openid.net/specs/openid-connect-core-1_0.html#RotateEncKeys
This means that the provider will look at the cache headers and will refresh when
the max-age is reached. If the server does not return any cache headers it shall
be up to the end user to call this method to refresh.
Params: - handler – the handler success/failure.
Returns: fluent self.
/**
* Retrieve the public server JSON Web Key (JWK) required to verify the authenticity
* of issued ID and access tokens. The provider will refresh the keys according to:
* https://openid.net/specs/openid-connect-core-1_0.html#RotateEncKeys
*
* This means that the provider will look at the cache headers and will refresh when
* the max-age is reached. If the server does not return any cache headers it shall
* be up to the end user to call this method to refresh.
* @param handler the handler success/failure.
* @return fluent self.
*/
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth jWKSet(Handler<AsyncResult<Void>> handler) {
delegate.jWKSet(handler);
return this;
}
Retrieve the public server JSON Web Key (JWK) required to verify the authenticity
of issued ID and access tokens. The provider will refresh the keys according to:
https://openid.net/specs/openid-connect-core-1_0.html#RotateEncKeys
This means that the provider will look at the cache headers and will refresh when
the max-age is reached. If the server does not return any cache headers it shall
be up to the end user to call this method to refresh.
Returns: fluent self.
/**
* Retrieve the public server JSON Web Key (JWK) required to verify the authenticity
* of issued ID and access tokens. The provider will refresh the keys according to:
* https://openid.net/specs/openid-connect-core-1_0.html#RotateEncKeys
*
* This means that the provider will look at the cache headers and will refresh when
* the max-age is reached. If the server does not return any cache headers it shall
* be up to the end user to call this method to refresh.
* @return fluent self.
*/
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth jWKSet() {
return
jWKSet(ar -> { });
}
Retrieve the public server JSON Web Key (JWK) required to verify the authenticity
of issued ID and access tokens. The provider will refresh the keys according to:
https://openid.net/specs/openid-connect-core-1_0.html#RotateEncKeys
This means that the provider will look at the cache headers and will refresh when
the max-age is reached. If the server does not return any cache headers it shall
be up to the end user to call this method to refresh.
Returns: fluent self.
/**
* Retrieve the public server JSON Web Key (JWK) required to verify the authenticity
* of issued ID and access tokens. The provider will refresh the keys according to:
* https://openid.net/specs/openid-connect-core-1_0.html#RotateEncKeys
*
* This means that the provider will look at the cache headers and will refresh when
* the max-age is reached. If the server does not return any cache headers it shall
* be up to the end user to call this method to refresh.
* @return fluent self.
*/
public io.reactivex.Completable rxJWKSet() {
return AsyncResultCompletable.toCompletable($handler -> {
jWKSet($handler);
});
}
Handled to be called when a key (mentioned on a JWT) is missing from the current config. Users are advised to call jWKSet
but being careful to implement some rate limiting function. This method isn't generic for several reasons. The provider is not aware of the capabilities of the backend IdP in terms of max allowed API calls. Some validation could be done at the key id, which only the end user is aware of. Params: - handler –
Returns: Future result.
/**
* Handled to be called when a key (mentioned on a JWT) is missing from the current config.
* Users are advised to call {@link io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth#jWKSet} but being careful to implement
* some rate limiting function.
*
* This method isn't generic for several reasons. The provider is not aware of the capabilities
* of the backend IdP in terms of max allowed API calls. Some validation could be done at the
* key id, which only the end user is aware of.
* @param handler
* @return Future result.
*/
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth missingKeyHandler(Handler<String> handler) {
delegate.missingKeyHandler(handler);
return this;
}
The client sends the end-user's browser to this endpoint to request their
authentication and consent. This endpoint is used in the code and implicit
OAuth 2.0 flows which require end-user interaction.
Params: - params – extra params to be included in the final URL.
Returns: the url to be used to authorize the user.
/**
* The client sends the end-user's browser to this endpoint to request their
* authentication and consent. This endpoint is used in the code and implicit
* OAuth 2.0 flows which require end-user interaction.
* @param params extra params to be included in the final URL.
* @return the url to be used to authorize the user.
*/
public String authorizeURL(JsonObject params) {
String ret = delegate.authorizeURL(params);
return ret;
}
Refresh the current User (access token).
Params: - user – the user (access token) to be refreshed.
- handler – the handler success/failure.
Returns: fluent self.
/**
* Refresh the current User (access token).
* @param user the user (access token) to be refreshed.
* @param handler the handler success/failure.
* @return fluent self.
*/
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth refresh(io.vertx.reactivex.ext.auth.User user, Handler<AsyncResult<io.vertx.reactivex.ext.auth.User>> handler) {
delegate.refresh(user.getDelegate(), new Handler<AsyncResult<io.vertx.ext.auth.User>>() {
public void handle(AsyncResult<io.vertx.ext.auth.User> ar) {
if (ar.succeeded()) {
handler.handle(io.vertx.core.Future.succeededFuture(io.vertx.reactivex.ext.auth.User.newInstance((io.vertx.ext.auth.User)ar.result())));
} else {
handler.handle(io.vertx.core.Future.failedFuture(ar.cause()));
}
}
});
return this;
}
Refresh the current User (access token).
Params: - user – the user (access token) to be refreshed.
Returns: fluent self.
/**
* Refresh the current User (access token).
* @param user the user (access token) to be refreshed.
* @return fluent self.
*/
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth refresh(io.vertx.reactivex.ext.auth.User user) {
return
refresh(user, ar -> { });
}
Refresh the current User (access token).
Params: - user – the user (access token) to be refreshed.
Returns: fluent self.
/**
* Refresh the current User (access token).
* @param user the user (access token) to be refreshed.
* @return fluent self.
*/
public io.reactivex.Single<io.vertx.reactivex.ext.auth.User> rxRefresh(io.vertx.reactivex.ext.auth.User user) {
return AsyncResultSingle.toSingle($handler -> {
refresh(user, $handler);
});
}
Revoke an obtained access or refresh token. More info https://tools.ietf.org/html/rfc7009.
Params: - user – the user (access token) to revoke.
- tokenType – the token type (either access_token or refresh_token).
- handler – the handler success/failure.
Returns: fluent self.
/**
* Revoke an obtained access or refresh token. More info <a href="https://tools.ietf.org/html/rfc7009">https://tools.ietf.org/html/rfc7009</a>.
* @param user the user (access token) to revoke.
* @param tokenType the token type (either access_token or refresh_token).
* @param handler the handler success/failure.
* @return fluent self.
*/
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth revoke(io.vertx.reactivex.ext.auth.User user, String tokenType, Handler<AsyncResult<Void>> handler) {
delegate.revoke(user.getDelegate(), tokenType, handler);
return this;
}
Revoke an obtained access or refresh token. More info https://tools.ietf.org/html/rfc7009.
Params: - user – the user (access token) to revoke.
- tokenType – the token type (either access_token or refresh_token).
Returns: fluent self.
/**
* Revoke an obtained access or refresh token. More info <a href="https://tools.ietf.org/html/rfc7009">https://tools.ietf.org/html/rfc7009</a>.
* @param user the user (access token) to revoke.
* @param tokenType the token type (either access_token or refresh_token).
* @return fluent self.
*/
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth revoke(io.vertx.reactivex.ext.auth.User user, String tokenType) {
return
revoke(user, tokenType, ar -> { });
}
Revoke an obtained access or refresh token. More info https://tools.ietf.org/html/rfc7009.
Params: - user – the user (access token) to revoke.
- tokenType – the token type (either access_token or refresh_token).
Returns: fluent self.
/**
* Revoke an obtained access or refresh token. More info <a href="https://tools.ietf.org/html/rfc7009">https://tools.ietf.org/html/rfc7009</a>.
* @param user the user (access token) to revoke.
* @param tokenType the token type (either access_token or refresh_token).
* @return fluent self.
*/
public io.reactivex.Completable rxRevoke(io.vertx.reactivex.ext.auth.User user, String tokenType) {
return AsyncResultCompletable.toCompletable($handler -> {
revoke(user, tokenType, $handler);
});
}
Revoke an obtained access token. More info https://tools.ietf.org/html/rfc7009.
Params: - user – the user (access token) to revoke.
- handler – the handler success/failure.
Returns: fluent self.
/**
* Revoke an obtained access token. More info <a href="https://tools.ietf.org/html/rfc7009">https://tools.ietf.org/html/rfc7009</a>.
* @param user the user (access token) to revoke.
* @param handler the handler success/failure.
* @return fluent self.
*/
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth revoke(io.vertx.reactivex.ext.auth.User user, Handler<AsyncResult<Void>> handler) {
delegate.revoke(user.getDelegate(), handler);
return this;
}
Revoke an obtained access token. More info https://tools.ietf.org/html/rfc7009.
Params: - user – the user (access token) to revoke.
Returns: fluent self.
/**
* Revoke an obtained access token. More info <a href="https://tools.ietf.org/html/rfc7009">https://tools.ietf.org/html/rfc7009</a>.
* @param user the user (access token) to revoke.
* @return fluent self.
*/
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth revoke(io.vertx.reactivex.ext.auth.User user) {
return
revoke(user, ar -> { });
}
Revoke an obtained access token. More info https://tools.ietf.org/html/rfc7009.
Params: - user – the user (access token) to revoke.
Returns: fluent self.
/**
* Revoke an obtained access token. More info <a href="https://tools.ietf.org/html/rfc7009">https://tools.ietf.org/html/rfc7009</a>.
* @param user the user (access token) to revoke.
* @return fluent self.
*/
public io.reactivex.Completable rxRevoke(io.vertx.reactivex.ext.auth.User user) {
return AsyncResultCompletable.toCompletable($handler -> {
revoke(user, $handler);
});
}
Retrieve profile information and other attributes for a logged-in end-user. More info https://openid.net/specs/openid-connect-core-1_0.html#UserInfo
Params: - user – the user (access token) to fetch the user info.
- handler – the handler success/failure.
Returns: fluent self.
/**
* Retrieve profile information and other attributes for a logged-in end-user. More info <a href="https://openid.net/specs/openid-connect-core-1_0.html#UserInfo">https://openid.net/specs/openid-connect-core-1_0.html#UserInfo</a>
* @param user the user (access token) to fetch the user info.
* @param handler the handler success/failure.
* @return fluent self.
*/
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth userInfo(io.vertx.reactivex.ext.auth.User user, Handler<AsyncResult<JsonObject>> handler) {
delegate.userInfo(user.getDelegate(), handler);
return this;
}
Retrieve profile information and other attributes for a logged-in end-user. More info https://openid.net/specs/openid-connect-core-1_0.html#UserInfo
Params: - user – the user (access token) to fetch the user info.
Returns: fluent self.
/**
* Retrieve profile information and other attributes for a logged-in end-user. More info <a href="https://openid.net/specs/openid-connect-core-1_0.html#UserInfo">https://openid.net/specs/openid-connect-core-1_0.html#UserInfo</a>
* @param user the user (access token) to fetch the user info.
* @return fluent self.
*/
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth userInfo(io.vertx.reactivex.ext.auth.User user) {
return
userInfo(user, ar -> { });
}
Retrieve profile information and other attributes for a logged-in end-user. More info https://openid.net/specs/openid-connect-core-1_0.html#UserInfo
Params: - user – the user (access token) to fetch the user info.
Returns: fluent self.
/**
* Retrieve profile information and other attributes for a logged-in end-user. More info <a href="https://openid.net/specs/openid-connect-core-1_0.html#UserInfo">https://openid.net/specs/openid-connect-core-1_0.html#UserInfo</a>
* @param user the user (access token) to fetch the user info.
* @return fluent self.
*/
public io.reactivex.Single<JsonObject> rxUserInfo(io.vertx.reactivex.ext.auth.User user) {
return AsyncResultSingle.toSingle($handler -> {
userInfo(user, $handler);
});
}
The logout (end-session) endpoint is specified in OpenID Connect Session Management 1.0.
More info: https://openid.net/specs/openid-connect-session-1_0.html.
Params: - user – the user to generate the url for
- params – extra parameters to apply to the url
Returns: the url to end the session.
/**
* The logout (end-session) endpoint is specified in OpenID Connect Session Management 1.0.
* More info: <a href="https://openid.net/specs/openid-connect-session-1_0.html">https://openid.net/specs/openid-connect-session-1_0.html</a>.
* @param user the user to generate the url for
* @param params extra parameters to apply to the url
* @return the url to end the session.
*/
public String endSessionURL(io.vertx.reactivex.ext.auth.User user, JsonObject params) {
String ret = delegate.endSessionURL(user.getDelegate(), params);
return ret;
}
The logout (end-session) endpoint is specified in OpenID Connect Session Management 1.0.
More info: https://openid.net/specs/openid-connect-session-1_0.html.
Params: - user – the user to generate the url for
Returns: the url to end the session.
/**
* The logout (end-session) endpoint is specified in OpenID Connect Session Management 1.0.
* More info: <a href="https://openid.net/specs/openid-connect-session-1_0.html">https://openid.net/specs/openid-connect-session-1_0.html</a>.
* @param user the user to generate the url for
* @return the url to end the session.
*/
public String endSessionURL(io.vertx.reactivex.ext.auth.User user) {
String ret = delegate.endSessionURL(user.getDelegate());
return ret;
}
Decode a token to a AccessToken
object. This is useful to handle bearer JWT tokens. Params: - token – the access token (base64 string)
- handler – A handler to receive the event
Returns: self
/**
* Decode a token to a {@link io.vertx.reactivex.ext.auth.oauth2.AccessToken} object. This is useful to handle bearer JWT tokens.
* @param token the access token (base64 string)
* @param handler A handler to receive the event
* @return self
*/
@Deprecated()
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth decodeToken(String token, Handler<AsyncResult<io.vertx.reactivex.ext.auth.oauth2.AccessToken>> handler) {
delegate.decodeToken(token, new Handler<AsyncResult<io.vertx.ext.auth.oauth2.AccessToken>>() {
public void handle(AsyncResult<io.vertx.ext.auth.oauth2.AccessToken> ar) {
if (ar.succeeded()) {
handler.handle(io.vertx.core.Future.succeededFuture(io.vertx.reactivex.ext.auth.oauth2.AccessToken.newInstance((io.vertx.ext.auth.oauth2.AccessToken)ar.result())));
} else {
handler.handle(io.vertx.core.Future.failedFuture(ar.cause()));
}
}
});
return this;
}
Decode a token to a AccessToken
object. This is useful to handle bearer JWT tokens. Params: - token – the access token (base64 string)
Returns: self
/**
* Decode a token to a {@link io.vertx.reactivex.ext.auth.oauth2.AccessToken} object. This is useful to handle bearer JWT tokens.
* @param token the access token (base64 string)
* @return self
*/
@Deprecated()
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth decodeToken(String token) {
return
decodeToken(token, ar -> { });
}
Decode a token to a AccessToken
object. This is useful to handle bearer JWT tokens. Params: - token – the access token (base64 string)
Returns: self
/**
* Decode a token to a {@link io.vertx.reactivex.ext.auth.oauth2.AccessToken} object. This is useful to handle bearer JWT tokens.
* @param token the access token (base64 string)
* @return self
*/
@Deprecated()
public io.reactivex.Single<io.vertx.reactivex.ext.auth.oauth2.AccessToken> rxDecodeToken(String token) {
return AsyncResultSingle.toSingle($handler -> {
decodeToken(token, $handler);
});
}
Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine
meta-information about this token.
Params: - token – the access token (base64 string)
- handler – A handler to receive the event
Returns: self
/**
* Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine
* meta-information about this token.
* @param token the access token (base64 string)
* @param handler A handler to receive the event
* @return self
*/
@Deprecated()
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth introspectToken(String token, Handler<AsyncResult<io.vertx.reactivex.ext.auth.oauth2.AccessToken>> handler) {
delegate.introspectToken(token, new Handler<AsyncResult<io.vertx.ext.auth.oauth2.AccessToken>>() {
public void handle(AsyncResult<io.vertx.ext.auth.oauth2.AccessToken> ar) {
if (ar.succeeded()) {
handler.handle(io.vertx.core.Future.succeededFuture(io.vertx.reactivex.ext.auth.oauth2.AccessToken.newInstance((io.vertx.ext.auth.oauth2.AccessToken)ar.result())));
} else {
handler.handle(io.vertx.core.Future.failedFuture(ar.cause()));
}
}
});
return this;
}
Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine
meta-information about this token.
Params: - token – the access token (base64 string)
Returns: self
/**
* Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine
* meta-information about this token.
* @param token the access token (base64 string)
* @return self
*/
@Deprecated()
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth introspectToken(String token) {
return
introspectToken(token, ar -> { });
}
Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine
meta-information about this token.
Params: - token – the access token (base64 string)
Returns: self
/**
* Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine
* meta-information about this token.
* @param token the access token (base64 string)
* @return self
*/
@Deprecated()
public io.reactivex.Single<io.vertx.reactivex.ext.auth.oauth2.AccessToken> rxIntrospectToken(String token) {
return AsyncResultSingle.toSingle($handler -> {
introspectToken(token, $handler);
});
}
Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine
meta-information about this token.
Params: - token – the access token (base64 string)
- tokenType – hint to the token type e.g.: `access_token`
- handler – A handler to receive the event
Returns: self
/**
* Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine
* meta-information about this token.
* @param token the access token (base64 string)
* @param tokenType hint to the token type e.g.: `access_token`
* @param handler A handler to receive the event
* @return self
*/
@Deprecated()
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth introspectToken(String token, String tokenType, Handler<AsyncResult<io.vertx.reactivex.ext.auth.oauth2.AccessToken>> handler) {
delegate.introspectToken(token, tokenType, new Handler<AsyncResult<io.vertx.ext.auth.oauth2.AccessToken>>() {
public void handle(AsyncResult<io.vertx.ext.auth.oauth2.AccessToken> ar) {
if (ar.succeeded()) {
handler.handle(io.vertx.core.Future.succeededFuture(io.vertx.reactivex.ext.auth.oauth2.AccessToken.newInstance((io.vertx.ext.auth.oauth2.AccessToken)ar.result())));
} else {
handler.handle(io.vertx.core.Future.failedFuture(ar.cause()));
}
}
});
return this;
}
Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine
meta-information about this token.
Params: - token – the access token (base64 string)
- tokenType – hint to the token type e.g.: `access_token`
Returns: self
/**
* Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine
* meta-information about this token.
* @param token the access token (base64 string)
* @param tokenType hint to the token type e.g.: `access_token`
* @return self
*/
@Deprecated()
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth introspectToken(String token, String tokenType) {
return
introspectToken(token, tokenType, ar -> { });
}
Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine
meta-information about this token.
Params: - token – the access token (base64 string)
- tokenType – hint to the token type e.g.: `access_token`
Returns: self
/**
* Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine
* meta-information about this token.
* @param token the access token (base64 string)
* @param tokenType hint to the token type e.g.: `access_token`
* @return self
*/
@Deprecated()
public io.reactivex.Single<io.vertx.reactivex.ext.auth.oauth2.AccessToken> rxIntrospectToken(String token, String tokenType) {
return AsyncResultSingle.toSingle($handler -> {
introspectToken(token, tokenType, $handler);
});
}
Returns the configured flow type for the Oauth2 provider.
Returns: the flow type.
/**
* Returns the configured flow type for the Oauth2 provider.
* @return the flow type.
*/
@Deprecated()
public io.vertx.ext.auth.oauth2.OAuth2FlowType getFlowType() {
io.vertx.ext.auth.oauth2.OAuth2FlowType ret = delegate.getFlowType();
return ret;
}
Loads a JWK Set from the remote provider.
When calling this method several times, the loaded JWKs are updated in the underlying JWT object.
Params: - handler –
Returns:
/**
* Loads a JWK Set from the remote provider.
*
* When calling this method several times, the loaded JWKs are updated in the underlying JWT object.
* @param handler
* @return
*/
@Deprecated()
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth loadJWK(Handler<AsyncResult<Void>> handler) {
delegate.loadJWK(handler);
return this;
}
Loads a JWK Set from the remote provider.
When calling this method several times, the loaded JWKs are updated in the underlying JWT object.
Returns:
/**
* Loads a JWK Set from the remote provider.
*
* When calling this method several times, the loaded JWKs are updated in the underlying JWT object.
* @return
*/
@Deprecated()
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth loadJWK() {
return
loadJWK(ar -> { });
}
Loads a JWK Set from the remote provider.
When calling this method several times, the loaded JWKs are updated in the underlying JWT object.
Returns:
/**
* Loads a JWK Set from the remote provider.
*
* When calling this method several times, the loaded JWKs are updated in the underlying JWT object.
* @return
*/
@Deprecated()
public io.reactivex.Completable rxLoadJWK() {
return AsyncResultCompletable.toCompletable($handler -> {
loadJWK($handler);
});
}
@Deprecated()
public io.vertx.reactivex.ext.auth.oauth2.OAuth2Auth rbacHandler(io.vertx.reactivex.ext.auth.oauth2.OAuth2RBAC rbac) {
delegate.rbacHandler(rbac.getDelegate());
return this;
}
public static OAuth2Auth newInstance(io.vertx.ext.auth.oauth2.OAuth2Auth arg) {
return arg != null ? new OAuth2Auth(arg) : null;
}
}