Class: VertxAuthOauth2::OpenIDConnectAuth
- Inherits:
-
Object
- Object
- VertxAuthOauth2::OpenIDConnectAuth
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/open_id_connect_auth.rb
Overview
Simplified factory to create an OAuth2Auth for OpenID Connect.
Direct Known Subclasses
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
-
+ (void) discover(vertx, config, handler) { ... }
Create a OAuth2Auth provider for OpenID Connect Discovery.
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)
Class Method Details
+ (Boolean) accept?(obj)
21 22 23 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/open_id_connect_auth.rb', line 21 def @@j_api_type.accept?(obj) obj.class == OpenIDConnectAuth end |
+ (void) discover(vertx, config, handler) { ... }
This method returns an undefined value.
Create a OAuth2Auth provider for OpenID Connect Discovery. The discovery will use the given site in the configuration options and attempt to load the well known descriptor. If the discovered config includes a json web key url, it will be also fetched and the JWKs will be loaded into the OAuth provider so tokens can be decoded.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/open_id_connect_auth.rb', line 46 def self.discover(*args) if args[0].class.method_defined?(:j_del) && args[1].class == Hash && true if (block_given?) return Java::IoVertxExtAuthOauth2Providers::OpenIDConnectAuth.java_method(:discover, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtAuthOauth2::OAuth2ClientOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0].j_del,Java::IoVertxExtAuthOauth2::OAuth2ClientOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxAuthOauth2::OAuth2Auth) : nil) } : promise) else promise = ::Vertx::Util::Utils.promise Java::IoVertxExtAuthOauth2Providers::OpenIDConnectAuth.java_method(:discover, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtAuthOauth2::OAuth2ClientOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0].j_del,Java::IoVertxExtAuthOauth2::OAuth2ClientOptions.new(::Vertx::Util::Utils.to_json_object(args[1])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxAuthOauth2::OAuth2Auth) : nil) } : promise) return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future,::VertxAuthOauth2::OAuth2Auth.j_api_type) end end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling discover(#{args[0]},#{args[1]})" end end |
+ (Object) j_api_type
30 31 32 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/open_id_connect_auth.rb', line 30 def self.j_api_type @@j_api_type end |
+ (Object) j_class
33 34 35 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/open_id_connect_auth.rb', line 33 def self.j_class Java::IoVertxExtAuthOauth2Providers::OpenIDConnectAuth.java_class end |
+ (Object) unwrap(obj)
27 28 29 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/open_id_connect_auth.rb', line 27 def @@j_api_type.unwrap(obj) obj.j_del end |
+ (Object) wrap(obj)
24 25 26 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-oauth2/open_id_connect_auth.rb', line 24 def @@j_api_type.wrap(obj) OpenIDConnectAuth.new(obj) end |