diff --git a/pom.xml b/pom.xml
index e39882e40..deaf173bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,7 +36,7 @@
- The first argument is a JSON object containing information for authenticating the user. What this actually contains - depends on the specific implementation. In the case of a simple username/password based - authentication it is likely to contain a JSON object with the following structure: -
- { - "username": "tim", - "password": "mypassword" - } -- For other types of authentication it contain different information - for example a JWT token or OAuth bearer token. -
- If the user is successfully authenticated a {@link User} object is passed to the handler in an {@link AsyncResult}. - The user object can then be used for authorisation. - - @public - @param authInfo {Object} The auth information - @param resultHandler {function} The result handler - */ - this.authenticate = function(authInfo, resultHandler) { - var __args = arguments; - if (__args.length === 2 && (typeof __args[0] === 'object' && __args[0] != null) && typeof __args[1] === 'function') { - j_authProvider["authenticate(io.vertx.core.json.JsonObject,io.vertx.core.Handler)"](utils.convParamJsonObject(authInfo), function(ar) { - if (ar.succeeded()) { - resultHandler(utils.convReturnVertxGen(User, ar.result()), null); - } else { - resultHandler(null, ar.cause()); - } - }); - } else throw new TypeError('function invoked with invalid arguments'); - }; - - // A reference to the underlying Java delegate - // NOTE! This is an internal API and must not be used in user code. - // If you rely on this property your code is likely to break if we change it / remove it without warning. - this._jdel = j_authProvider; -}; - -AuthProvider._jclass = utils.getJavaClass("io.vertx.ext.auth.AuthProvider"); -AuthProvider._jtype = { - accept: function(obj) { - return AuthProvider._jclass.isInstance(obj._jdel); - }, - wrap: function(jdel) { - var obj = Object.create(AuthProvider.prototype, {}); - AuthProvider.apply(obj, arguments); - return obj; - }, - unwrap: function(obj) { - return obj._jdel; - } -}; -AuthProvider._create = function(jdel) { - var obj = Object.create(AuthProvider.prototype, {}); - AuthProvider.apply(obj, arguments); - return obj; -} -module.exports = AuthProvider; \ No newline at end of file diff --git a/vertx-auth-common/src/main/resources/vertx-auth-common-js/user.js b/vertx-auth-common/src/main/resources/vertx-auth-common-js/user.js deleted file mode 100644 index ee0361cbf..000000000 --- a/vertx-auth-common/src/main/resources/vertx-auth-common-js/user.js +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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. - */ - -/** @module vertx-auth-common-js/user */ -var utils = require('vertx-js/util/utils'); -var AuthProvider = require('vertx-auth-common-js/auth_provider'); - -var io = Packages.io; -var JsonObject = io.vertx.core.json.JsonObject; -var JUser = Java.type('io.vertx.ext.auth.User'); - -/** - Represents an authenticates User and contains operations to authorise the user. -
- Please consult the documentation for a detailed explanation. - - @class -*/ -var User = function(j_val) { - - var j_user = j_val; - var that = this; - - /** - Is the user authorised to - - @public - @param authority {string} the authority - what this really means is determined by the specific implementation. It might represent a permission to access a resource e.g. `printers:printer34` or it might represent authority to a role in a roles based model, e.g. `role:admin`. - @param resultHandler {function} handler that will be called with an {@link AsyncResult} containing the value `true` if the they has the authority or `false` otherwise. - @return {User} the User to enable fluent use - */ - this.isAuthorised = function(authority, resultHandler) { - var __args = arguments; - if (__args.length === 2 && typeof __args[0] === 'string' && typeof __args[1] === 'function') { - j_user["isAuthorised(java.lang.String,io.vertx.core.Handler)"](authority, function(ar) { - if (ar.succeeded()) { - resultHandler(ar.result(), null); - } else { - resultHandler(null, ar.cause()); - } - }); - return that; - } else throw new TypeError('function invoked with invalid arguments'); - }; - - /** - The User object will cache any authorities that it knows it has to avoid hitting the - underlying auth provider each time. Use this method if you want to clear this cache. - - @public - - @return {User} the User to enable fluent use - */ - this.clearCache = function() { - var __args = arguments; - if (__args.length === 0) { - j_user["clearCache()"](); - return that; - } else throw new TypeError('function invoked with invalid arguments'); - }; - - /** - Get the underlying principal for the User. What this actually returns depends on the implementation. - For a simple user/password based auth, it's likely to contain a JSON object with the following structure: -
- { - "username", "tim" - } -- - @public - - @return {Object} JSON representation of the Principal - */ - this.principal = function() { - var __args = arguments; - if (__args.length === 0) { - return utils.convReturnJson(j_user["principal()"]()); - } else throw new TypeError('function invoked with invalid arguments'); - }; - - /** - Set the auth provider for the User. This is typically used to reattach a detached User with an AuthProvider, e.g. - after it has been deserialized. - - @public - @param authProvider {AuthProvider} the AuthProvider - this must be the same type of AuthProvider that originally created the User - */ - this.setAuthProvider = function(authProvider) { - var __args = arguments; - if (__args.length === 1 && typeof __args[0] === 'object' && __args[0]._jdel) { - j_user["setAuthProvider(io.vertx.ext.auth.AuthProvider)"](authProvider._jdel); - } else throw new TypeError('function invoked with invalid arguments'); - }; - - // A reference to the underlying Java delegate - // NOTE! This is an internal API and must not be used in user code. - // If you rely on this property your code is likely to break if we change it / remove it without warning. - this._jdel = j_user; -}; - -User._jclass = utils.getJavaClass("io.vertx.ext.auth.User"); -User._jtype = { - accept: function(obj) { - return User._jclass.isInstance(obj._jdel); - }, - wrap: function(jdel) { - var obj = Object.create(User.prototype, {}); - User.apply(obj, arguments); - return obj; - }, - unwrap: function(obj) { - return obj._jdel; - } -}; -User._create = function(jdel) { - var obj = Object.create(User.prototype, {}); - User.apply(obj, arguments); - return obj; -} -module.exports = User; \ No newline at end of file diff --git a/vertx-auth-common/src/main/resources/vertx-auth-common/auth_provider.rb b/vertx-auth-common/src/main/resources/vertx-auth-common/auth_provider.rb deleted file mode 100644 index 859036d39..000000000 --- a/vertx-auth-common/src/main/resources/vertx-auth-common/auth_provider.rb +++ /dev/null @@ -1,59 +0,0 @@ -require 'vertx-auth-common/user' -require 'vertx/util/utils.rb' -# Generated from io.vertx.ext.auth.AuthProvider -module VertxAuthCommon - # - # User-facing interface for authenticating users. - class AuthProvider - # @private - # @param j_del [::VertxAuthCommon::AuthProvider] the java delegate - def initialize(j_del) - @j_del = j_del - end - # @private - # @return [::VertxAuthCommon::AuthProvider] the underlying java delegate - def j_del - @j_del - end - @@j_api_type = Object.new - def @@j_api_type.accept?(obj) - obj.class == AuthProvider - end - def @@j_api_type.wrap(obj) - AuthProvider.new(obj) - end - def @@j_api_type.unwrap(obj) - obj.j_del - end - def self.j_api_type - @@j_api_type - end - def self.j_class - Java::IoVertxExtAuth::AuthProvider.java_class - end - # Authenticate a user. - #
- # The first argument is a JSON object containing information for authenticating the user. What this actually contains - # depends on the specific implementation. In the case of a simple username/password based - # authentication it is likely to contain a JSON object with the following structure: - #
- # { - # "username": "tim", - # "password": "mypassword" - # } - #- # For other types of authentication it contain different information - for example a JWT token or OAuth bearer token. - #
- # If the user is successfully authenticated a {::VertxAuthCommon::User} object is passed to the handler in an {AsyncResult}. - # The user object can then be used for authorisation. - # @param [Hash{String => Object}] authInfo The auth information - # @yield The result handler - # @return [void] - def authenticate(authInfo=nil) - if authInfo.class == Hash && block_given? - return @j_del.java_method(:authenticate, [Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(::Vertx::Util::Utils.to_json_object(authInfo),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxAuthCommon::User) : nil) })) - end - raise ArgumentError, "Invalid arguments when calling authenticate(#{authInfo})" - end - end -end diff --git a/vertx-auth-common/src/main/resources/vertx-auth-common/user.rb b/vertx-auth-common/src/main/resources/vertx-auth-common/user.rb deleted file mode 100644 index 916469b26..000000000 --- a/vertx-auth-common/src/main/resources/vertx-auth-common/user.rb +++ /dev/null @@ -1,81 +0,0 @@ -require 'vertx-auth-common/auth_provider' -require 'vertx/util/utils.rb' -# Generated from io.vertx.ext.auth.User -module VertxAuthCommon - # Represents an authenticates User and contains operations to authorise the user. - #
- # Please consult the documentation for a detailed explanation. - class User - # @private - # @param j_del [::VertxAuthCommon::User] the java delegate - def initialize(j_del) - @j_del = j_del - end - # @private - # @return [::VertxAuthCommon::User] the underlying java delegate - def j_del - @j_del - end - @@j_api_type = Object.new - def @@j_api_type.accept?(obj) - obj.class == User - end - def @@j_api_type.wrap(obj) - User.new(obj) - end - def @@j_api_type.unwrap(obj) - obj.j_del - end - def self.j_api_type - @@j_api_type - end - def self.j_class - Java::IoVertxExtAuth::User.java_class - end - # Is the user authorised to - # @param [String] authority the authority - what this really means is determined by the specific implementation. It might represent a permission to access a resource e.g. `printers:printer34` or it might represent authority to a role in a roles based model, e.g. `role:admin`. - # @yield handler that will be called with an {AsyncResult} containing the value `true` if the they has the authority or `false` otherwise. - # @return [self] - def is_authorised(authority=nil) - if authority.class == String && block_given? - @j_del.java_method(:isAuthorised, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(authority,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) - return self - end - raise ArgumentError, "Invalid arguments when calling is_authorised(#{authority})" - end - # The User object will cache any authorities that it knows it has to avoid hitting the - # underlying auth provider each time. Use this method if you want to clear this cache. - # @return [self] - def clear_cache - if !block_given? - @j_del.java_method(:clearCache, []).call() - return self - end - raise ArgumentError, "Invalid arguments when calling clear_cache()" - end - # Get the underlying principal for the User. What this actually returns depends on the implementation. - # For a simple user/password based auth, it's likely to contain a JSON object with the following structure: - #
- # { - # "username", "tim" - # } - #- # @return [Hash{String => Object}] JSON representation of the Principal - def principal - if !block_given? - return @j_del.java_method(:principal, []).call() != nil ? JSON.parse(@j_del.java_method(:principal, []).call().encode) : nil - end - raise ArgumentError, "Invalid arguments when calling principal()" - end - # Set the auth provider for the User. This is typically used to reattach a detached User with an AuthProvider, e.g. - # after it has been deserialized. - # @param [::VertxAuthCommon::AuthProvider] authProvider the AuthProvider - this must be the same type of AuthProvider that originally created the User - # @return [void] - def set_auth_provider(authProvider=nil) - if authProvider.class.method_defined?(:j_del) && !block_given? - return @j_del.java_method(:setAuthProvider, [Java::IoVertxExtAuth::AuthProvider.java_class]).call(authProvider.j_del) - end - raise ArgumentError, "Invalid arguments when calling set_auth_provider(#{authProvider})" - end - end -end diff --git a/vertx-auth-htdigest/src/main/asciidoc/groovy/index.adoc b/vertx-auth-htdigest/src/main/asciidoc/groovy/index.adoc index 28af360d0..d60e03378 100644 --- a/vertx-auth-htdigest/src/main/asciidoc/groovy/index.adoc +++ b/vertx-auth-htdigest/src/main/asciidoc/groovy/index.adoc @@ -16,7 +16,7 @@ dependency to the _dependencies_ section of your build descriptor:
- JsonObject js = new JsonObject(); - js.put(MongoAuth.PROPERTY_COLLECTION_NAME, createCollectionName(MongoAuth.DEFAULT_COLLECTION_NAME)); -- - @memberof module:vertx-auth-mongo-js/mongo_auth - @param mongoClient {MongoClient} an instance of to be used for data storage and retrival - @param config {Object} the configuration object for the current instance. By this - @return {MongoAuth} the created instance of {@link MongoAuth}s - */ -MongoAuth.create = function(mongoClient, config) { - var __args = arguments; - if (__args.length === 2 && typeof __args[0] === 'object' && __args[0]._jdel && (typeof __args[1] === 'object' && __args[1] != null)) { - return utils.convReturnVertxGen(MongoAuth, JMongoAuth["create(io.vertx.ext.mongo.MongoClient,io.vertx.core.json.JsonObject)"](mongoClient._jdel, utils.convParamJsonObject(config))); - } else throw new TypeError('function invoked with invalid arguments'); -}; - -module.exports = MongoAuth; \ No newline at end of file diff --git a/vertx-auth-mongo/src/main/resources/vertx-auth-mongo/hash_strategy.rb b/vertx-auth-mongo/src/main/resources/vertx-auth-mongo/hash_strategy.rb deleted file mode 100644 index 7952038b7..000000000 --- a/vertx-auth-mongo/src/main/resources/vertx-auth-mongo/hash_strategy.rb +++ /dev/null @@ -1,90 +0,0 @@ -require 'vertx-auth-common/user' -require 'vertx/util/utils.rb' -# Generated from io.vertx.ext.auth.mongo.HashStrategy -module VertxAuthMongo - # Determines how the hashing is computed in the implementation You can implement this to provide a different hashing - # strategy to the default. - class HashStrategy - # @private - # @param j_del [::VertxAuthMongo::HashStrategy] the java delegate - def initialize(j_del) - @j_del = j_del - end - # @private - # @return [::VertxAuthMongo::HashStrategy] the underlying java delegate - def j_del - @j_del - end - @@j_api_type = Object.new - def @@j_api_type.accept?(obj) - obj.class == HashStrategy - end - def @@j_api_type.wrap(obj) - HashStrategy.new(obj) - end - def @@j_api_type.unwrap(obj) - obj.j_del - end - def self.j_api_type - @@j_api_type - end - def self.j_class - Java::IoVertxExtAuthMongo::HashStrategy.java_class - end - # Compute the hashed password given the unhashed password and the user - # @param [String] password the unhashed password - # @param [::VertxAuthCommon::User] user the user to get the salt for. This paramter is needed, if the is declared to be used - # @return [String] the hashed password - def compute_hash(password=nil,user=nil) - if password.class == String && user.class.method_defined?(:j_del) && !block_given? - return @j_del.java_method(:computeHash, [Java::java.lang.String.java_class,Java::IoVertxExtAuth::User.java_class]).call(password,user.j_del) - end - raise ArgumentError, "Invalid arguments when calling compute_hash(#{password},#{user})" - end - # Retrieve the password from the user, or as clear text or as hashed version, depending on the definition - # @param [::VertxAuthCommon::User] user the user to get the stored password for - # @return [String] the password, either as hashed version or as cleartext, depending on the preferences - def get_stored_pwd(user=nil) - if user.class.method_defined?(:j_del) && !block_given? - return @j_del.java_method(:getStoredPwd, [Java::IoVertxExtAuth::User.java_class]).call(user.j_del) - end - raise ArgumentError, "Invalid arguments when calling get_stored_pwd(#{user})" - end - # Retrieve the salt. The source of the salt can be the external salt or the propriate column of the given user, - # depending on the defined HashSaltStyle - # @param [::VertxAuthCommon::User] user the user to get the salt for. This paramter is needed, if the is declared to be used - # @return [String] null in case of the salt of the user or a defined external salt - def get_salt(user=nil) - if user.class.method_defined?(:j_del) && !block_given? - return @j_del.java_method(:getSalt, [Java::IoVertxExtAuth::User.java_class]).call(user.j_del) - end - raise ArgumentError, "Invalid arguments when calling get_salt(#{user})" - end - # Set an external salt. This method should be used in case of - # @param [String] salt the salt, which shall be used - # @return [void] - def set_external_salt(salt=nil) - if salt.class == String && !block_given? - return @j_del.java_method(:setExternalSalt, [Java::java.lang.String.java_class]).call(salt) - end - raise ArgumentError, "Invalid arguments when calling set_external_salt(#{salt})" - end - # Set the saltstyle as defined by HashSaltStyle. - # @param [:NO_SALT,:COLUMN,:EXTERNAL] saltStyle the HashSaltStyle to be used - # @return [void] - def set_salt_style(saltStyle=nil) - if saltStyle.class == Symbol && !block_given? - return @j_del.java_method(:setSaltStyle, [Java::IoVertxExtAuthMongo::HashSaltStyle.java_class]).call(Java::IoVertxExtAuthMongo::HashSaltStyle.valueOf(saltStyle.to_s)) - end - raise ArgumentError, "Invalid arguments when calling set_salt_style(#{saltStyle})" - end - # Get the defined HashSaltStyle of the current instance - # @return [:NO_SALT,:COLUMN,:EXTERNAL] the saltStyle - def get_salt_style - if !block_given? - return @j_del.java_method(:getSaltStyle, []).call().name.intern - end - raise ArgumentError, "Invalid arguments when calling get_salt_style()" - end - end -end diff --git a/vertx-auth-mongo/src/main/resources/vertx-auth-mongo/mongo_auth.rb b/vertx-auth-mongo/src/main/resources/vertx-auth-mongo/mongo_auth.rb deleted file mode 100644 index 6b2975518..000000000 --- a/vertx-auth-mongo/src/main/resources/vertx-auth-mongo/mongo_auth.rb +++ /dev/null @@ -1,248 +0,0 @@ -require 'vertx-auth-common/user' -require 'vertx-mongo/mongo_client' -require 'vertx-auth-mongo/hash_strategy' -require 'vertx-auth-common/auth_provider' -require 'vertx/util/utils.rb' -# Generated from io.vertx.ext.auth.mongo.MongoAuth -module VertxAuthMongo - # An extension of AuthProvider which is using as store - class MongoAuth < ::VertxAuthCommon::AuthProvider - # @private - # @param j_del [::VertxAuthMongo::MongoAuth] the java delegate - def initialize(j_del) - super(j_del) - @j_del = j_del - end - # @private - # @return [::VertxAuthMongo::MongoAuth] the underlying java delegate - def j_del - @j_del - end - @@j_api_type = Object.new - def @@j_api_type.accept?(obj) - obj.class == MongoAuth - end - def @@j_api_type.wrap(obj) - MongoAuth.new(obj) - end - def @@j_api_type.unwrap(obj) - obj.j_del - end - def self.j_api_type - @@j_api_type - end - def self.j_class - Java::IoVertxExtAuthMongo::MongoAuth.java_class - end - # @param [Hash{String => Object}] arg0 - # @yield - # @return [void] - def authenticate(arg0=nil) - if arg0.class == Hash && block_given? - return @j_del.java_method(:authenticate, [Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(::Vertx::Util::Utils.to_json_object(arg0),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxAuthCommon::User) : nil) })) - end - raise ArgumentError, "Invalid arguments when calling authenticate(#{arg0})" - end - # Creates an instance of MongoAuth by using the given and configuration object. An example for a - # configuration object: - # - #
- # JsonObject js = new JsonObject(); - # js.put(MongoAuth.PROPERTY_COLLECTION_NAME, createCollectionName(MongoAuth.DEFAULT_COLLECTION_NAME)); - #- # @param [::VertxMongo::MongoClient] mongoClient an instance of to be used for data storage and retrival - # @param [Hash{String => Object}] config the configuration object for the current instance. By this - # @return [::VertxAuthMongo::MongoAuth] the created instance of {::VertxAuthMongo::MongoAuth}s - def self.create(mongoClient=nil,config=nil) - if mongoClient.class.method_defined?(:j_del) && config.class == Hash && !block_given? - return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthMongo::MongoAuth.java_method(:create, [Java::IoVertxExtMongo::MongoClient.java_class,Java::IoVertxCoreJson::JsonObject.java_class]).call(mongoClient.j_del,::Vertx::Util::Utils.to_json_object(config)),::VertxAuthMongo::MongoAuth) - end - raise ArgumentError, "Invalid arguments when calling create(#{mongoClient},#{config})" - end - # Set the name of the collection to be used. Defaults to DEFAULT_COLLECTION_NAME - # @param [String] collectionName the name of the collection to be used for storing and reading user data - # @return [self] - def set_collection_name(collectionName=nil) - if collectionName.class == String && !block_given? - @j_del.java_method(:setCollectionName, [Java::java.lang.String.java_class]).call(collectionName) - return self - end - raise ArgumentError, "Invalid arguments when calling set_collection_name(#{collectionName})" - end - # Set the name of the field to be used for the username. Defaults to DEFAULT_USERNAME_FIELD - # @param [String] fieldName the name of the field to be used - # @return [self] - def set_username_field(fieldName=nil) - if fieldName.class == String && !block_given? - @j_del.java_method(:setUsernameField, [Java::java.lang.String.java_class]).call(fieldName) - return self - end - raise ArgumentError, "Invalid arguments when calling set_username_field(#{fieldName})" - end - # Set the name of the field to be used for the password Defaults to DEFAULT_PASSWORD_FIELD - # @param [String] fieldName the name of the field to be used - # @return [self] - def set_password_field(fieldName=nil) - if fieldName.class == String && !block_given? - @j_del.java_method(:setPasswordField, [Java::java.lang.String.java_class]).call(fieldName) - return self - end - raise ArgumentError, "Invalid arguments when calling set_password_field(#{fieldName})" - end - # Set the name of the field to be used for the roles. Defaults to DEFAULT_ROLE_FIELD. Roles are expected to - # be saved as JsonArray - # @param [String] fieldName the name of the field to be used - # @return [self] - def set_role_field(fieldName=nil) - if fieldName.class == String && !block_given? - @j_del.java_method(:setRoleField, [Java::java.lang.String.java_class]).call(fieldName) - return self - end - raise ArgumentError, "Invalid arguments when calling set_role_field(#{fieldName})" - end - # Set the name of the field to be used for the permissions. Defaults to DEFAULT_PERMISSION_FIELD. - # Permissions are expected to be saved as JsonArray - # @param [String] fieldName the name of the field to be used - # @return [self] - def set_permission_field(fieldName=nil) - if fieldName.class == String && !block_given? - @j_del.java_method(:setPermissionField, [Java::java.lang.String.java_class]).call(fieldName) - return self - end - raise ArgumentError, "Invalid arguments when calling set_permission_field(#{fieldName})" - end - # Set the name of the field to be used as property for the username in the method - # {::VertxAuthCommon::AuthProvider#authenticate}. Defaults to DEFAULT_CREDENTIAL_USERNAME_FIELD - # @param [String] fieldName the name of the field to be used - # @return [self] - def set_username_credential_field(fieldName=nil) - if fieldName.class == String && !block_given? - @j_del.java_method(:setUsernameCredentialField, [Java::java.lang.String.java_class]).call(fieldName) - return self - end - raise ArgumentError, "Invalid arguments when calling set_username_credential_field(#{fieldName})" - end - # Set the name of the field to be used as property for the password of credentials in the method - # {::VertxAuthCommon::AuthProvider#authenticate}. Defaults to DEFAULT_CREDENTIAL_PASSWORD_FIELD - # @param [String] fieldName the name of the field to be used - # @return [self] - def set_password_credential_field(fieldName=nil) - if fieldName.class == String && !block_given? - @j_del.java_method(:setPasswordCredentialField, [Java::java.lang.String.java_class]).call(fieldName) - return self - end - raise ArgumentError, "Invalid arguments when calling set_password_credential_field(#{fieldName})" - end - # Set the name of the field to be used for the salt. Only used when {::VertxAuthMongo::HashStrategy#set_salt_style} is - # set to - # @param [String] fieldName the name of the field to be used - # @return [self] - def set_salt_field(fieldName=nil) - if fieldName.class == String && !block_given? - @j_del.java_method(:setSaltField, [Java::java.lang.String.java_class]).call(fieldName) - return self - end - raise ArgumentError, "Invalid arguments when calling set_salt_field(#{fieldName})" - end - # The name of the collection used to store User objects inside. Defaults to DEFAULT_COLLECTION_NAME - # @return [String] the collectionName - def get_collection_name - if !block_given? - return @j_del.java_method(:getCollectionName, []).call() - end - raise ArgumentError, "Invalid arguments when calling get_collection_name()" - end - # Get the name of the field to be used for the username. Defaults to DEFAULT_USERNAME_FIELD - # @return [String] the usernameField - def get_username_field - if !block_given? - return @j_del.java_method(:getUsernameField, []).call() - end - raise ArgumentError, "Invalid arguments when calling get_username_field()" - end - # Get the name of the field to be used for the password Defaults to DEFAULT_PASSWORD_FIELD - # @return [String] the passwordField - def get_password_field - if !block_given? - return @j_del.java_method(:getPasswordField, []).call() - end - raise ArgumentError, "Invalid arguments when calling get_password_field()" - end - # Get the name of the field to be used for the roles. Defaults to DEFAULT_ROLE_FIELD. Roles are expected to - # be saved as JsonArray - # @return [String] the roleField - def get_role_field - if !block_given? - return @j_del.java_method(:getRoleField, []).call() - end - raise ArgumentError, "Invalid arguments when calling get_role_field()" - end - # Get the name of the field to be used for the permissions. Defaults to DEFAULT_PERMISSION_FIELD. - # Permissions are expected to be saved as JsonArray - # @return [String] the permissionField - def get_permission_field - if !block_given? - return @j_del.java_method(:getPermissionField, []).call() - end - raise ArgumentError, "Invalid arguments when calling get_permission_field()" - end - # Get the name of the field to be used as property for the username in the method - # {::VertxAuthCommon::AuthProvider#authenticate}. Defaults to DEFAULT_CREDENTIAL_USERNAME_FIELD - # @return [String] the usernameCredentialField - def get_username_credential_field - if !block_given? - return @j_del.java_method(:getUsernameCredentialField, []).call() - end - raise ArgumentError, "Invalid arguments when calling get_username_credential_field()" - end - # Get the name of the field to be used as property for the password of credentials in the method - # {::VertxAuthCommon::AuthProvider#authenticate}. Defaults to DEFAULT_CREDENTIAL_PASSWORD_FIELD - # @return [String] the passwordCredentialField - def get_password_credential_field - if !block_given? - return @j_del.java_method(:getPasswordCredentialField, []).call() - end - raise ArgumentError, "Invalid arguments when calling get_password_credential_field()" - end - # Get the name of the field to be used for the salt. Only used when {::VertxAuthMongo::HashStrategy#set_salt_style} is - # set to - # @return [String] the saltField - def get_salt_field - if !block_given? - return @j_del.java_method(:getSaltField, []).call() - end - raise ArgumentError, "Invalid arguments when calling get_salt_field()" - end - # The HashStrategy which is used by the current instance - # @param [::VertxAuthMongo::HashStrategy] hashStrategy the {::VertxAuthMongo::HashStrategy} to be set - # @return [self] - def set_hash_strategy(hashStrategy=nil) - if hashStrategy.class.method_defined?(:j_del) && !block_given? - @j_del.java_method(:setHashStrategy, [Java::IoVertxExtAuthMongo::HashStrategy.java_class]).call(hashStrategy.j_del) - return self - end - raise ArgumentError, "Invalid arguments when calling set_hash_strategy(#{hashStrategy})" - end - # The HashStrategy which is used by the current instance - # @return [::VertxAuthMongo::HashStrategy] the defined instance of {::VertxAuthMongo::HashStrategy} - def get_hash_strategy - if !block_given? - return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:getHashStrategy, []).call(),::VertxAuthMongo::HashStrategy) - end - raise ArgumentError, "Invalid arguments when calling get_hash_strategy()" - end - # Insert a new user into mongo in the convenient way - # @param [String] username the username to be set - # @param [String] password the passsword in clear text, will be adapted following the definitions of the defined {::VertxAuthMongo::HashStrategy} - # @param [Array
",
+ "redirect_uri" to "http://localhost:3000/callback"
+ )
+}
+
+// Callbacks
+// Save the access token
+oauth2.getToken(tokenConfig, { res ->
+ if (res.failed()) {
+ System.err.println("Access Token Error: ${res.cause().getMessage()}")
+ } else {
+ // Get the access token object (the authorization code is given from the previous step).
+ var token = res.result()
+ }
+})
+
+----
+
+==== Password Credentials Flow
+
+This flow is suitable when the resource owner has a trust relationship with the client, such as its computer
+operating system or a highly privileged application. Use this flow only when other flows are not viable or when you
+need a fast way to test your application.
+
+[source,kotlin]
+----
+
+// Initialize the OAuth2 Library
+var oauth2 = OAuth2Auth.create(vertx, OAuth2FlowType.PASSWORD)
+
+var tokenConfig = json {
+ obj(
+ "username" to "username",
+ "password" to "password"
+ )
+}
+
+// Callbacks
+// Save the access token
+oauth2.getToken(tokenConfig, { res ->
+ if (res.failed()) {
+ System.err.println("Access Token Error: ${res.cause().getMessage()}")
+ } else {
+ // Get the access token object (the authorization code is given from the previous step).
+ var token = res.result()
+
+ oauth2.api(HttpMethod.GET, "/users", json {
+ obj("access_token" to token.principal().getString("access_token"))
+ }, { res2 ->
+ // the user object should be returned here...
+ })
+ }
+})
+
+----
+
+==== Client Credentials Flow
+
+This flow is suitable when client is requesting access to the protected resources under its control.
+
+[source,kotlin]
+----
+
+// Set the client credentials and the OAuth2 server
+var credentials = OAuth2ClientOptions(
+ clientID = "",
+ clientSecret = "",
+ site = "https://api.oauth.com")
+
+
+// Initialize the OAuth2 Library
+var oauth2 = OAuth2Auth.create(vertx, OAuth2FlowType.CLIENT, credentials)
+
+var tokenConfig = json {
+ obj()
+}
+
+// Callbacks
+// Save the access token
+oauth2.getToken(tokenConfig, { res ->
+ if (res.failed()) {
+ System.err.println("Access Token Error: ${res.cause().getMessage()}")
+ } else {
+ // Get the access token object (the authorization code is given from the previous step).
+ var token = res.result()
+ }
+})
+
+----
+
+=== AccessToken object
+
+When a token expires we need to refresh it. OAuth2 offers the AccessToken class that add a couple of useful methods
+to refresh the access token when it is expired.
+
+[source,kotlin]
+----
+// Check if the token is expired. If expired it is refreshed.
+if (token.expired()) {
+ // Callbacks
+ token.refresh({ res ->
+ if (res.succeeded()) {
+ // success
+ } else {
+ // error handling...
+ }
+ })
+}
+
+----
+
+When you've done with the token or you want to log out, you can revoke the access token and refresh token.
+
+[source,kotlin]
+----
+// Revoke only the access token
+token.revoke("access_token", { res ->
+ // Session ended. But the refresh_token is still valid.
+
+ // Revoke the refresh_token
+ token.revoke("refresh_token", { res1 ->
+ println("token revoked.")
+ })
+})
+
+----
+
+=== Example configuration for common OAuth2 providers
+
+For convenience there are several helpers to assist your with your configuration. Currently we provide:
+
+* Azure Active Directory `link:../../apidocs/io/vertx/ext/auth/oauth2/providers/AzureADAuth.html[AzureADAuth]`
+* Box.com `link:../../apidocs/io/vertx/ext/auth/oauth2/providers/BoxAuth.html[BoxAuth]`
+* Dropbox `link:../../apidocs/io/vertx/ext/auth/oauth2/providers/DropboxAuth.html[DropboxAuth]`
+* Facebook `link:../../apidocs/io/vertx/ext/auth/oauth2/providers/FacebookAuth.html[FacebookAuth]`
+* Foursquare `link:../../apidocs/io/vertx/ext/auth/oauth2/providers/FoursquareAuth.html[FoursquareAuth]`
+* Github `link:../../apidocs/io/vertx/ext/auth/oauth2/providers/GithubAuth.html[GithubAuth]`
+* Google `link:../../apidocs/io/vertx/ext/auth/oauth2/providers/GoogleAuth.html[GoogleAuth]`
+* Instagram `link:../../apidocs/io/vertx/ext/auth/oauth2/providers/InstagramAuth.html[InstagramAuth]`
+* Keycloak `link:../../apidocs/io/vertx/ext/auth/oauth2/providers/KeycloakAuth.html[KeycloakAuth]`
+* LinkedIn `link:../../apidocs/io/vertx/ext/auth/oauth2/providers/LinkedInAuth.html[LinkedInAuth]`
+* Mailchimp `link:../../apidocs/io/vertx/ext/auth/oauth2/providers/MailchimpAuth.html[MailchimpAuth]`
+* Salesforce `link:../../apidocs/io/vertx/ext/auth/oauth2/providers/SalesforceAuth.html[SalesforceAuth]`
+* Shopify `link:../../apidocs/io/vertx/ext/auth/oauth2/providers/ShopifyAuth.html[ShopifyAuth]`
+* Soundcloud `link:../../apidocs/io/vertx/ext/auth/oauth2/providers/SoundcloudAuth.html[SoundcloudAuth]`
+* Stripe `link:../../apidocs/io/vertx/ext/auth/oauth2/providers/StripeAuth.html[StripeAuth]`
+* Twitter `link:../../apidocs/io/vertx/ext/auth/oauth2/providers/TwitterAuth.html[TwitterAuth]`
+
+==== JBoss Keycloak
+
+When using this Keycloak the provider has knowledge on how to parse access tokens and extract grants from inside.
+This information is quite valuable since it allows to do authorization at the API level, for example:
+
+[source,kotlin]
+----
+// you would get this config from the keycloak admin console
+var keycloakJson = json {
+ obj(
+ "realm" to "master",
+ "realm-public-key" to "MIIBIjANBgkqhk...wIDAQAB",
+ "auth-server-url" to "http://localhost:9000/auth",
+ "ssl-required" to "external",
+ "resource" to "frontend",
+ "credentials" to obj("secret" to "2fbf5e18-b923-4a83-9657-b4ebd5317f60")
+ )
+}
+
+// Initialize the OAuth2 Library
+var oauth2 = KeycloakAuth.create(vertx, OAuth2FlowType.PASSWORD, keycloakJson)
+
+// first get a token (authenticate)
+oauth2.getToken(json {
+ obj(
+ "username" to "user",
+ "password" to "secret"
+ )
+}, { res ->
+ if (res.failed()) {
+ // error handling...
+ } else {
+ var token = res.result()
+
+ // now check for permissions
+ token.isAuthorised("account:manage-account", { r ->
+ if (r.result()) {
+ // this user is authorized to manage its account
+ }
+ })
+ }
+})
+
+----
+
+We also provide a helper class for Keycloak so that we can we can easily retrieve decoded token and some necessary
+data (e.g. `preferred_username`) from the Keycloak principal. For example:
+
+[source,kotlin]
+----
+// you can get the decoded `id_token` from the Keycloak principal
+var idToken = KeycloakHelper.idToken(principal)
+
+// you can also retrieve some properties directly from the Keycloak principal
+// e.g. `preferred_username`
+var username = KeycloakHelper.preferredUsername(principal)
+
+----
+
+==== Google Server to Server
+
+The provider also supports Server to Server or the RFC7523 extension. This is a feature present on Google with their
+service account.
+
+=== Token Introspection
+
+Tokens can be introspected in order to assert that they are still valid. Although there is RFC7660 for this purpose
+not many providers implement it. Instead there are variations also known as `TokenInfo` end points. The OAuth2
+provider will accept both end points as a configuration. Currently we are known to work with `Google` and `Keycloak`.
+
+Token introspection assumes that tokens are opaque, so they need to be validated on the provider server. Every time a
+token is validated it requires a round trip to the provider. Introspection can be performed at the OAuth2 level or at
+the User level:
+
+[source,kotlin]
+----
+// OAuth2Auth level
+oauth2.introspectToken("opaque string", { res ->
+ if (res.succeeded()) {
+ // token is valid!
+ var accessToken = res.result()
+ }
+})
+
+// User level
+token.introspect({ res ->
+ if (res.succeeded()) {
+ // Token is valid!
+ }
+})
+
+----
+
+=== Verifying JWT tokens
+
+We've just covered how to introspect a token however when dealing with JWT tokens one can reduce the amount of trips
+to the provider server thus enhancing your overall response times. In this case tokens will be verified using the
+JWT protocol at your application side only. Verifying JWT tokens is cheaper and offers better performance, however
+due to the stateless nature of JWTs it is not possible to know if a user is logged out and a token is invalid. For
+this specific case one needs to use the token introspection if the provider supports it.
+
+[source,kotlin]
+----
+// OAuth2Auth level
+oauth2.decodeToken("jwt-token", { res ->
+ if (res.succeeded()) {
+ // token is valid!
+ var accessToken = res.result()
+ }
+})
+
+----
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/asciidoc/ruby/index.adoc b/vertx-auth-oauth2/src/main/asciidoc/ruby/index.adoc
index ebd7b3898..c2052ff10 100644
--- a/vertx-auth-oauth2/src/main/asciidoc/ruby/index.adoc
+++ b/vertx-auth-oauth2/src/main/asciidoc/ruby/index.adoc
@@ -12,7 +12,7 @@ dependency to the _dependencies_ section of your build descriptor:
io.vertx
vertx-auth-oauth2
- 3.4.0.Beta1
+ 3.4.0-SNAPSHOT
----
@@ -20,7 +20,7 @@ dependency to the _dependencies_ section of your build descriptor:
[source,groovy,subs="+attributes"]
----
-compile 'io.vertx:vertx-auth-oauth2:3.4.0.Beta1'
+compile 'io.vertx:vertx-auth-oauth2:3.4.0-SNAPSHOT'
----
OAuth2 lets users grant the access to the desired resources to third party applications, giving them the possibility
diff --git a/vertx-auth-oauth2/src/main/kotlin/io/vertx/kotlin/ext/auth/oauth2/OAuth2ClientOptions.kt b/vertx-auth-oauth2/src/main/kotlin/io/vertx/kotlin/ext/auth/oauth2/OAuth2ClientOptions.kt
index fa9726c03..c153bfdb4 100644
--- a/vertx-auth-oauth2/src/main/kotlin/io/vertx/kotlin/ext/auth/oauth2/OAuth2ClientOptions.kt
+++ b/vertx-auth-oauth2/src/main/kotlin/io/vertx/kotlin/ext/auth/oauth2/OAuth2ClientOptions.kt
@@ -48,6 +48,7 @@ import io.vertx.core.net.ProxyOptions
* @param maxHeaderSize
* @param maxInitialLineLength
* @param maxPoolSize
+ * @param maxRedirects
* @param maxWaitQueueSize
* @param maxWebsocketFrameSize
* @param metricsName
@@ -121,6 +122,7 @@ fun OAuth2ClientOptions(
maxHeaderSize: Int? = null,
maxInitialLineLength: Int? = null,
maxPoolSize: Int? = null,
+ maxRedirects: Int? = null,
maxWaitQueueSize: Int? = null,
maxWebsocketFrameSize: Int? = null,
metricsName: String? = null,
@@ -262,6 +264,9 @@ fun OAuth2ClientOptions(
if (maxPoolSize != null) {
this.setMaxPoolSize(maxPoolSize)
}
+ if (maxRedirects != null) {
+ this.setMaxRedirects(maxRedirects)
+ }
if (maxWaitQueueSize != null) {
this.setMaxWaitQueueSize(maxWaitQueueSize)
}
diff --git a/vertx-auth-oauth2/src/main/resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule b/vertx-auth-oauth2/src/main/resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
deleted file mode 100644
index e3d769142..000000000
--- a/vertx-auth-oauth2/src/main/resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
+++ /dev/null
@@ -1,4 +0,0 @@
-moduleName = io.vertx.ext.auth.oauth2.providers.TwitterAuth-module
-moduleVersion = 1.0
-extensionClasses = io.vertx.groovy.ext.auth.oauth2.OAuth2Auth_GroovyExtension
-staticExtensionClasses = io.vertx.groovy.ext.auth.oauth2.providers.AzureADAuth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.providers.BoxAuth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.providers.CloudFoundryAuth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.providers.DropboxAuth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.providers.FacebookAuth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.providers.FoursquareAuth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.providers.GithubAuth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.providers.GoogleAuth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.providers.HerokuAuth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.providers.InstagramAuth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.providers.KeycloakAuth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.KeycloakHelper_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.providers.LinkedInAuth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.providers.LiveAuth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.providers.MailchimpAuth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.OAuth2Auth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.providers.SalesforceAuth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.providers.ShopifyAuth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.providers.SoundcloudAuth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.providers.StripeAuth_GroovyStaticExtension, io.vertx.groovy.ext.auth.oauth2.providers.TwitterAuth_GroovyStaticExtension
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/access_token.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/access_token.js
deleted file mode 100644
index ae36bdc3e..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/access_token.js
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/access_token */
-var utils = require('vertx-js/util/utils');
-var User = require('vertx-auth-common-js/user');
-var AuthProvider = require('vertx-auth-common-js/auth_provider');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JAccessToken = Java.type('io.vertx.ext.auth.oauth2.AccessToken');
-
-/**
- AccessToken extension to the User interface
-
- @class
-*/
-var AccessToken = function(j_val) {
-
- var j_accessToken = j_val;
- var that = this;
- User.call(this, j_val);
-
- /**
-
- @public
- @param arg0 {string}
- @param arg1 {function}
- @return {User}
- */
- this.isAuthorised = function(arg0, arg1) {
- var __args = arguments;
- if (__args.length === 2 && typeof __args[0] === 'string' && typeof __args[1] === 'function') {
- j_accessToken["isAuthorised(java.lang.String,io.vertx.core.Handler)"](arg0, function(ar) {
- if (ar.succeeded()) {
- arg1(ar.result(), null);
- } else {
- arg1(null, ar.cause());
- }
- });
- return that;
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- /**
-
- @public
-
- @return {User}
- */
- this.clearCache = function() {
- var __args = arguments;
- if (__args.length === 0) {
- j_accessToken["clearCache()"]();
- return that;
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- /**
-
- @public
-
- @return {Object}
- */
- this.principal = function() {
- var __args = arguments;
- if (__args.length === 0) {
- return utils.convReturnJson(j_accessToken["principal()"]());
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- /**
-
- @public
- @param arg0 {AuthProvider}
- */
- this.setAuthProvider = function(arg0) {
- var __args = arguments;
- if (__args.length === 1 && typeof __args[0] === 'object' && __args[0]._jdel) {
- j_accessToken["setAuthProvider(io.vertx.ext.auth.AuthProvider)"](arg0._jdel);
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- /**
- Check if the access token is expired or not.
-
- @public
-
- @return {boolean}
- */
- this.expired = function() {
- var __args = arguments;
- if (__args.length === 0) {
- return j_accessToken["expired()"]();
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- /**
- Refresh the access token
-
- @public
- @param callback {function} - The callback function returning the results.
- @return {AccessToken}
- */
- this.refresh = function(callback) {
- var __args = arguments;
- if (__args.length === 1 && typeof __args[0] === 'function') {
- j_accessToken["refresh(io.vertx.core.Handler)"](function(ar) {
- if (ar.succeeded()) {
- callback(null, null);
- } else {
- callback(null, ar.cause());
- }
- });
- return that;
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- /**
- Revoke access or refresh token
-
- @public
- @param token_type {string} - A String containing the type of token to revoke. Should be either "access_token" or "refresh_token".
- @param callback {function} - The callback function returning the results.
- @return {AccessToken}
- */
- this.revoke = function(token_type, callback) {
- var __args = arguments;
- if (__args.length === 2 && typeof __args[0] === 'string' && typeof __args[1] === 'function') {
- j_accessToken["revoke(java.lang.String,io.vertx.core.Handler)"](token_type, function(ar) {
- if (ar.succeeded()) {
- callback(null, null);
- } else {
- callback(null, ar.cause());
- }
- });
- return that;
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- /**
- Revoke refresh token and calls the logout endpoint. This is a openid-connect extension and might not be
- available on all providers.
-
- @public
- @param callback {function} - The callback function returning the results.
- @return {AccessToken}
- */
- this.logout = function(callback) {
- var __args = arguments;
- if (__args.length === 1 && typeof __args[0] === 'function') {
- j_accessToken["logout(io.vertx.core.Handler)"](function(ar) {
- if (ar.succeeded()) {
- callback(null, null);
- } else {
- callback(null, ar.cause());
- }
- });
- return that;
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- /**
- Introspect access token. This is an OAuth2 extension that allow to verify if an access token is still valid.
-
- @public
- @param callback {function} - The callback function returning the results.
- @return {AccessToken}
- */
- this.introspect = function(callback) {
- var __args = arguments;
- if (__args.length === 1 && typeof __args[0] === 'function') {
- j_accessToken["introspect(io.vertx.core.Handler)"](function(ar) {
- if (ar.succeeded()) {
- callback(null, null);
- } else {
- callback(null, ar.cause());
- }
- });
- return that;
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_accessToken;
-};
-
-AccessToken._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.AccessToken");
-AccessToken._jtype = {
- accept: function(obj) {
- return AccessToken._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(AccessToken.prototype, {});
- AccessToken.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-AccessToken._create = function(jdel) {
- var obj = Object.create(AccessToken.prototype, {});
- AccessToken.apply(obj, arguments);
- return obj;
-}
-module.exports = AccessToken;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/azure_ad_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/azure_ad_auth.js
deleted file mode 100644
index b29a96d21..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/azure_ad_auth.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/azure_ad_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JAzureADAuth = Java.type('io.vertx.ext.auth.oauth2.providers.AzureADAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var AzureADAuth = function(j_val) {
-
- var j_azureADAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_azureADAuth;
-};
-
-AzureADAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.AzureADAuth");
-AzureADAuth._jtype = {
- accept: function(obj) {
- return AzureADAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(AzureADAuth.prototype, {});
- AzureADAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-AzureADAuth._create = function(jdel) {
- var obj = Object.create(AzureADAuth.prototype, {});
- AzureADAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for Microsoft Azure Active Directory
-
- @memberof module:vertx-auth-oauth2-js/azure_ad_auth
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by Azure
- @param clientSecret {string} the client secret given to you by Azure
- @param guid {string} the guid of your application given to you by Azure
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-AzureADAuth.create = function() {
- var __args = arguments;
- if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && typeof __args[3] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JAzureADAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2], __args[3]));
- }else if (__args.length === 5 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && typeof __args[3] === 'string' && (typeof __args[4] === 'object' && __args[4] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JAzureADAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3], __args[4] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[4]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = AzureADAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/box_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/box_auth.js
deleted file mode 100644
index be4fd98a7..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/box_auth.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/box_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JBoxAuth = Java.type('io.vertx.ext.auth.oauth2.providers.BoxAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var BoxAuth = function(j_val) {
-
- var j_boxAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_boxAuth;
-};
-
-BoxAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.BoxAuth");
-BoxAuth._jtype = {
- accept: function(obj) {
- return BoxAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(BoxAuth.prototype, {});
- BoxAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-BoxAuth._create = function(jdel) {
- var obj = Object.create(BoxAuth.prototype, {});
- BoxAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for App.net
-
- @memberof module:vertx-auth-oauth2-js/box_auth
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by box.com
- @param clientSecret {string} the client secret given to you by box.com
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-BoxAuth.create = function() {
- var __args = arguments;
- if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JBoxAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2]));
- }else if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && (typeof __args[3] === 'object' && __args[3] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JBoxAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[3]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = BoxAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/cloud_foundry_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/cloud_foundry_auth.js
deleted file mode 100644
index 6b04fa0aa..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/cloud_foundry_auth.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/cloud_foundry_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JCloudFoundryAuth = Java.type('io.vertx.ext.auth.oauth2.providers.CloudFoundryAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var CloudFoundryAuth = function(j_val) {
-
- var j_cloudFoundryAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_cloudFoundryAuth;
-};
-
-CloudFoundryAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.CloudFoundryAuth");
-CloudFoundryAuth._jtype = {
- accept: function(obj) {
- return CloudFoundryAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(CloudFoundryAuth.prototype, {});
- CloudFoundryAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-CloudFoundryAuth._create = function(jdel) {
- var obj = Object.create(CloudFoundryAuth.prototype, {});
- CloudFoundryAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for CloudFoundry UAA
-
- @memberof module:vertx-auth-oauth2-js/cloud_foundry_auth
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by CloudFoundry UAA
- @param clientSecret {string} the client secret given to you by CloudFoundry UAA
- @param uuaURL {string} the url to your UUA server instance
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-CloudFoundryAuth.create = function() {
- var __args = arguments;
- if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && typeof __args[3] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JCloudFoundryAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2], __args[3]));
- }else if (__args.length === 5 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && typeof __args[3] === 'string' && (typeof __args[4] === 'object' && __args[4] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JCloudFoundryAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3], __args[4] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[4]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = CloudFoundryAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/cloud_foundry_uaa.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/cloud_foundry_uaa.js
deleted file mode 100644
index 5c776f928..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/cloud_foundry_uaa.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/cloud_foundry_uaa */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JCloudFoundryUAA = Java.type('io.vertx.ext.auth.oauth2.providers.CloudFoundryUAA');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var CloudFoundryUAA = function(j_val) {
-
- var j_cloudFoundryUAA = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_cloudFoundryUAA;
-};
-
-CloudFoundryUAA._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.CloudFoundryUAA");
-CloudFoundryUAA._jtype = {
- accept: function(obj) {
- return CloudFoundryUAA._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(CloudFoundryUAA.prototype, {});
- CloudFoundryUAA.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-CloudFoundryUAA._create = function(jdel) {
- var obj = Object.create(CloudFoundryUAA.prototype, {});
- CloudFoundryUAA.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for CloudFoundry UAA
-
- @memberof module:vertx-auth-oauth2-js/cloud_foundry_uaa
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by CloudFoundry UAA
- @param clientSecret {string} the client secret given to you by CloudFoundry UAA
- @param uuaURL {string} the url to your UUA server instance
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-CloudFoundryUAA.create = function() {
- var __args = arguments;
- if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && typeof __args[3] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JCloudFoundryUAA["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2], __args[3]));
- }else if (__args.length === 5 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && typeof __args[3] === 'string' && (typeof __args[4] === 'object' && __args[4] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JCloudFoundryUAA["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3], __args[4] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[4]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = CloudFoundryUAA;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/dropbox_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/dropbox_auth.js
deleted file mode 100644
index 867ad66b0..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/dropbox_auth.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/dropbox_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JDropboxAuth = Java.type('io.vertx.ext.auth.oauth2.providers.DropboxAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var DropboxAuth = function(j_val) {
-
- var j_dropboxAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_dropboxAuth;
-};
-
-DropboxAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.DropboxAuth");
-DropboxAuth._jtype = {
- accept: function(obj) {
- return DropboxAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(DropboxAuth.prototype, {});
- DropboxAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-DropboxAuth._create = function(jdel) {
- var obj = Object.create(DropboxAuth.prototype, {});
- DropboxAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for Dropbox
-
- @memberof module:vertx-auth-oauth2-js/dropbox_auth
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by Dropbox
- @param clientSecret {string} the client secret given to you by Dropbox
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-DropboxAuth.create = function() {
- var __args = arguments;
- if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JDropboxAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2]));
- }else if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && (typeof __args[3] === 'object' && __args[3] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JDropboxAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[3]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = DropboxAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/facebook_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/facebook_auth.js
deleted file mode 100644
index ad6ef0229..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/facebook_auth.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/facebook_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JFacebookAuth = Java.type('io.vertx.ext.auth.oauth2.providers.FacebookAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var FacebookAuth = function(j_val) {
-
- var j_facebookAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_facebookAuth;
-};
-
-FacebookAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.FacebookAuth");
-FacebookAuth._jtype = {
- accept: function(obj) {
- return FacebookAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(FacebookAuth.prototype, {});
- FacebookAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-FacebookAuth._create = function(jdel) {
- var obj = Object.create(FacebookAuth.prototype, {});
- FacebookAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for Facebook
-
- @memberof module:vertx-auth-oauth2-js/facebook_auth
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by Facebook
- @param clientSecret {string} the client secret given to you by Facebook
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-FacebookAuth.create = function() {
- var __args = arguments;
- if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JFacebookAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2]));
- }else if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && (typeof __args[3] === 'object' && __args[3] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JFacebookAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[3]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = FacebookAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/foursquare_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/foursquare_auth.js
deleted file mode 100644
index b3142cf37..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/foursquare_auth.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/foursquare_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JFoursquareAuth = Java.type('io.vertx.ext.auth.oauth2.providers.FoursquareAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var FoursquareAuth = function(j_val) {
-
- var j_foursquareAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_foursquareAuth;
-};
-
-FoursquareAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.FoursquareAuth");
-FoursquareAuth._jtype = {
- accept: function(obj) {
- return FoursquareAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(FoursquareAuth.prototype, {});
- FoursquareAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-FoursquareAuth._create = function(jdel) {
- var obj = Object.create(FoursquareAuth.prototype, {});
- FoursquareAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for Dropbox
-
- @memberof module:vertx-auth-oauth2-js/foursquare_auth
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by Dropbox
- @param clientSecret {string} the client secret given to you by Dropbox
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-FoursquareAuth.create = function() {
- var __args = arguments;
- if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JFoursquareAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2]));
- }else if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && (typeof __args[3] === 'object' && __args[3] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JFoursquareAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[3]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = FoursquareAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/github_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/github_auth.js
deleted file mode 100644
index b6640da4a..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/github_auth.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/github_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JGithubAuth = Java.type('io.vertx.ext.auth.oauth2.providers.GithubAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var GithubAuth = function(j_val) {
-
- var j_githubAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_githubAuth;
-};
-
-GithubAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.GithubAuth");
-GithubAuth._jtype = {
- accept: function(obj) {
- return GithubAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(GithubAuth.prototype, {});
- GithubAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-GithubAuth._create = function(jdel) {
- var obj = Object.create(GithubAuth.prototype, {});
- GithubAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for Gtihub
-
- @memberof module:vertx-auth-oauth2-js/github_auth
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by Github
- @param clientSecret {string} the client secret given to you by Github
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-GithubAuth.create = function() {
- var __args = arguments;
- if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JGithubAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2]));
- }else if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && (typeof __args[3] === 'object' && __args[3] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JGithubAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[3]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = GithubAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/google_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/google_auth.js
deleted file mode 100644
index 5c08d1c85..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/google_auth.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/google_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JGoogleAuth = Java.type('io.vertx.ext.auth.oauth2.providers.GoogleAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var GoogleAuth = function(j_val) {
-
- var j_googleAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_googleAuth;
-};
-
-GoogleAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.GoogleAuth");
-GoogleAuth._jtype = {
- accept: function(obj) {
- return GoogleAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(GoogleAuth.prototype, {});
- GoogleAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-GoogleAuth._create = function(jdel) {
- var obj = Object.create(GoogleAuth.prototype, {});
- GoogleAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for Google
-
- @memberof module:vertx-auth-oauth2-js/google_auth
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by Google
- @param clientSecret {string} the client secret given to you by Google
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-GoogleAuth.create = function() {
- var __args = arguments;
- if (__args.length === 2 && typeof __args[0] === 'object' && __args[0]._jdel && (typeof __args[1] === 'object' && __args[1] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JGoogleAuth["create(io.vertx.core.Vertx,io.vertx.core.json.JsonObject)"](__args[0]._jdel, utils.convParamJsonObject(__args[1])));
- }else if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JGoogleAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2]));
- }else if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && (typeof __args[1] === 'object' && __args[1] != null) && (typeof __args[2] === 'object' && __args[2] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JGoogleAuth["create(io.vertx.core.Vertx,io.vertx.core.json.JsonObject,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, utils.convParamJsonObject(__args[1]), __args[2] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[2]))) : null));
- }else if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && (typeof __args[3] === 'object' && __args[3] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JGoogleAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[3]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = GoogleAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/heroku_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/heroku_auth.js
deleted file mode 100644
index 1fdde3616..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/heroku_auth.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/heroku_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JHerokuAuth = Java.type('io.vertx.ext.auth.oauth2.providers.HerokuAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var HerokuAuth = function(j_val) {
-
- var j_herokuAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_herokuAuth;
-};
-
-HerokuAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.HerokuAuth");
-HerokuAuth._jtype = {
- accept: function(obj) {
- return HerokuAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(HerokuAuth.prototype, {});
- HerokuAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-HerokuAuth._create = function(jdel) {
- var obj = Object.create(HerokuAuth.prototype, {});
- HerokuAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for live.com
-
- @memberof module:vertx-auth-oauth2-js/heroku_auth
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by Heroku
- @param clientSecret {string} the client secret given to you by Heroku
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-HerokuAuth.create = function() {
- var __args = arguments;
- if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JHerokuAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2]));
- }else if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && (typeof __args[3] === 'object' && __args[3] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JHerokuAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[3]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = HerokuAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/instagram_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/instagram_auth.js
deleted file mode 100644
index b02d88390..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/instagram_auth.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/instagram_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JInstagramAuth = Java.type('io.vertx.ext.auth.oauth2.providers.InstagramAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var InstagramAuth = function(j_val) {
-
- var j_instagramAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_instagramAuth;
-};
-
-InstagramAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.InstagramAuth");
-InstagramAuth._jtype = {
- accept: function(obj) {
- return InstagramAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(InstagramAuth.prototype, {});
- InstagramAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-InstagramAuth._create = function(jdel) {
- var obj = Object.create(InstagramAuth.prototype, {});
- InstagramAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for Instagram
-
- @memberof module:vertx-auth-oauth2-js/instagram_auth
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by Instagram
- @param clientSecret {string} the client secret given to you by Instagram
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-InstagramAuth.create = function() {
- var __args = arguments;
- if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JInstagramAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2]));
- }else if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && (typeof __args[3] === 'object' && __args[3] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JInstagramAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[3]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = InstagramAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/keycloak_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/keycloak_auth.js
deleted file mode 100644
index 31143f783..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/keycloak_auth.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/keycloak_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JKeycloakAuth = Java.type('io.vertx.ext.auth.oauth2.providers.KeycloakAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var KeycloakAuth = function(j_val) {
-
- var j_keycloakAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_keycloakAuth;
-};
-
-KeycloakAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.KeycloakAuth");
-KeycloakAuth._jtype = {
- accept: function(obj) {
- return KeycloakAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(KeycloakAuth.prototype, {});
- KeycloakAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-KeycloakAuth._create = function(jdel) {
- var obj = Object.create(KeycloakAuth.prototype, {});
- KeycloakAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for Keycloak
-
- @memberof module:vertx-auth-oauth2-js/keycloak_auth
- @param vertx {Vertx}
- @param flow {Object} the oauth2 flow to use
- @param config {Object} the json config file exported from Keycloak admin console
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-KeycloakAuth.create = function() {
- var __args = arguments;
- if (__args.length === 2 && typeof __args[0] === 'object' && __args[0]._jdel && (typeof __args[1] === 'object' && __args[1] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JKeycloakAuth["create(io.vertx.core.Vertx,io.vertx.core.json.JsonObject)"](__args[0]._jdel, utils.convParamJsonObject(__args[1])));
- }else if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && (typeof __args[2] === 'object' && __args[2] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JKeycloakAuth["create(io.vertx.core.Vertx,io.vertx.ext.auth.oauth2.OAuth2FlowType,io.vertx.core.json.JsonObject)"](__args[0]._jdel, io.vertx.ext.auth.oauth2.OAuth2FlowType.valueOf(__args[1]), utils.convParamJsonObject(__args[2])));
- }else if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && (typeof __args[1] === 'object' && __args[1] != null) && (typeof __args[2] === 'object' && __args[2] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JKeycloakAuth["create(io.vertx.core.Vertx,io.vertx.core.json.JsonObject,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, utils.convParamJsonObject(__args[1]), __args[2] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[2]))) : null));
- }else if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && (typeof __args[2] === 'object' && __args[2] != null) && (typeof __args[3] === 'object' && __args[3] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JKeycloakAuth["create(io.vertx.core.Vertx,io.vertx.ext.auth.oauth2.OAuth2FlowType,io.vertx.core.json.JsonObject,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, io.vertx.ext.auth.oauth2.OAuth2FlowType.valueOf(__args[1]), utils.convParamJsonObject(__args[2]), __args[3] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[3]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = KeycloakAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/keycloak_helper.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/keycloak_helper.js
deleted file mode 100644
index bbc1ea445..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/keycloak_helper.js
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/keycloak_helper */
-var utils = require('vertx-js/util/utils');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JKeycloakHelper = Java.type('io.vertx.ext.auth.oauth2.KeycloakHelper');
-
-/**
- Helper class for processing Keycloak principal.
-
- @class
-*/
-var KeycloakHelper = function(j_val) {
-
- var j_keycloakHelper = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_keycloakHelper;
-};
-
-KeycloakHelper._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.KeycloakHelper");
-KeycloakHelper._jtype = {
- accept: function(obj) {
- return KeycloakHelper._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(KeycloakHelper.prototype, {});
- KeycloakHelper.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-KeycloakHelper._create = function(jdel) {
- var obj = Object.create(KeycloakHelper.prototype, {});
- KeycloakHelper.apply(obj, arguments);
- return obj;
-}
-/**
- Get raw `id_token` string from the principal.
-
- @memberof module:vertx-auth-oauth2-js/keycloak_helper
- @param principal {Object} user principal
- @return {string} the raw id token string
- */
-KeycloakHelper.rawIdToken = function(principal) {
- var __args = arguments;
- if (__args.length === 1 && (typeof __args[0] === 'object' && __args[0] != null)) {
- return JKeycloakHelper["rawIdToken(io.vertx.core.json.JsonObject)"](utils.convParamJsonObject(principal));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-/**
- Get decoded `id_token` from the principal.
-
- @memberof module:vertx-auth-oauth2-js/keycloak_helper
- @param principal {Object} user principal
- @return {Object} the id token
- */
-KeycloakHelper.idToken = function(principal) {
- var __args = arguments;
- if (__args.length === 1 && (typeof __args[0] === 'object' && __args[0] != null)) {
- return utils.convReturnJson(JKeycloakHelper["idToken(io.vertx.core.json.JsonObject)"](utils.convParamJsonObject(principal)));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-/**
- Get raw `access_token` string from the principal.
-
- @memberof module:vertx-auth-oauth2-js/keycloak_helper
- @param principal {Object} user principal
- @return {string} the raw access token string
- */
-KeycloakHelper.rawAccessToken = function(principal) {
- var __args = arguments;
- if (__args.length === 1 && (typeof __args[0] === 'object' && __args[0] != null)) {
- return JKeycloakHelper["rawAccessToken(io.vertx.core.json.JsonObject)"](utils.convParamJsonObject(principal));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-/**
- Get decoded `access_token` from the principal.
-
- @memberof module:vertx-auth-oauth2-js/keycloak_helper
- @param principal {Object} user principal
- @return {Object} the access token
- */
-KeycloakHelper.accessToken = function(principal) {
- var __args = arguments;
- if (__args.length === 1 && (typeof __args[0] === 'object' && __args[0] != null)) {
- return utils.convReturnJson(JKeycloakHelper["accessToken(io.vertx.core.json.JsonObject)"](utils.convParamJsonObject(principal)));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-/**
-
- @memberof module:vertx-auth-oauth2-js/keycloak_helper
- @param principal {Object}
- @return {number}
- */
-KeycloakHelper.authTime = function(principal) {
- var __args = arguments;
- if (__args.length === 1 && (typeof __args[0] === 'object' && __args[0] != null)) {
- return JKeycloakHelper["authTime(io.vertx.core.json.JsonObject)"](utils.convParamJsonObject(principal));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-/**
-
- @memberof module:vertx-auth-oauth2-js/keycloak_helper
- @param principal {Object}
- @return {string}
- */
-KeycloakHelper.sessionState = function(principal) {
- var __args = arguments;
- if (__args.length === 1 && (typeof __args[0] === 'object' && __args[0] != null)) {
- return JKeycloakHelper["sessionState(io.vertx.core.json.JsonObject)"](utils.convParamJsonObject(principal));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-/**
-
- @memberof module:vertx-auth-oauth2-js/keycloak_helper
- @param principal {Object}
- @return {string}
- */
-KeycloakHelper.acr = function(principal) {
- var __args = arguments;
- if (__args.length === 1 && (typeof __args[0] === 'object' && __args[0] != null)) {
- return JKeycloakHelper["acr(io.vertx.core.json.JsonObject)"](utils.convParamJsonObject(principal));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-/**
-
- @memberof module:vertx-auth-oauth2-js/keycloak_helper
- @param principal {Object}
- @return {string}
- */
-KeycloakHelper.name = function(principal) {
- var __args = arguments;
- if (__args.length === 1 && (typeof __args[0] === 'object' && __args[0] != null)) {
- return JKeycloakHelper["name(io.vertx.core.json.JsonObject)"](utils.convParamJsonObject(principal));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-/**
-
- @memberof module:vertx-auth-oauth2-js/keycloak_helper
- @param principal {Object}
- @return {string}
- */
-KeycloakHelper.email = function(principal) {
- var __args = arguments;
- if (__args.length === 1 && (typeof __args[0] === 'object' && __args[0] != null)) {
- return JKeycloakHelper["email(io.vertx.core.json.JsonObject)"](utils.convParamJsonObject(principal));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-/**
-
- @memberof module:vertx-auth-oauth2-js/keycloak_helper
- @param principal {Object}
- @return {string}
- */
-KeycloakHelper.preferredUsername = function(principal) {
- var __args = arguments;
- if (__args.length === 1 && (typeof __args[0] === 'object' && __args[0] != null)) {
- return JKeycloakHelper["preferredUsername(io.vertx.core.json.JsonObject)"](utils.convParamJsonObject(principal));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-/**
-
- @memberof module:vertx-auth-oauth2-js/keycloak_helper
- @param principal {Object}
- @return {string}
- */
-KeycloakHelper.nickName = function(principal) {
- var __args = arguments;
- if (__args.length === 1 && (typeof __args[0] === 'object' && __args[0] != null)) {
- return JKeycloakHelper["nickName(io.vertx.core.json.JsonObject)"](utils.convParamJsonObject(principal));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-/**
-
- @memberof module:vertx-auth-oauth2-js/keycloak_helper
- @param principal {Object}
- @return {Array.}
- */
-KeycloakHelper.allowedOrigins = function(principal) {
- var __args = arguments;
- if (__args.length === 1 && (typeof __args[0] === 'object' && __args[0] != null)) {
- return utils.convReturnSet(JKeycloakHelper["allowedOrigins(io.vertx.core.json.JsonObject)"](utils.convParamJsonObject(principal)));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-/**
- Parse the token string with base64 decoder.
- This will only obtain the "payload" part of the token.
-
- @memberof module:vertx-auth-oauth2-js/keycloak_helper
- @param token {string} token string
- @return {Object} token payload json object
- */
-KeycloakHelper.parseToken = function(token) {
- var __args = arguments;
- if (__args.length === 1 && typeof __args[0] === 'string') {
- return utils.convReturnJson(JKeycloakHelper["parseToken(java.lang.String)"](token));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = KeycloakHelper;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/linked_in_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/linked_in_auth.js
deleted file mode 100644
index 9356c4c1d..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/linked_in_auth.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/linked_in_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JLinkedInAuth = Java.type('io.vertx.ext.auth.oauth2.providers.LinkedInAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var LinkedInAuth = function(j_val) {
-
- var j_linkedInAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_linkedInAuth;
-};
-
-LinkedInAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.LinkedInAuth");
-LinkedInAuth._jtype = {
- accept: function(obj) {
- return LinkedInAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(LinkedInAuth.prototype, {});
- LinkedInAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-LinkedInAuth._create = function(jdel) {
- var obj = Object.create(LinkedInAuth.prototype, {});
- LinkedInAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for LinkedIn
-
- @memberof module:vertx-auth-oauth2-js/linked_in_auth
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by LinkedIn
- @param clientSecret {string} the client secret given to you by LinkedIn
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-LinkedInAuth.create = function() {
- var __args = arguments;
- if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JLinkedInAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2]));
- }else if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && (typeof __args[3] === 'object' && __args[3] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JLinkedInAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[3]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = LinkedInAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/live_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/live_auth.js
deleted file mode 100644
index e55bc6992..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/live_auth.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/live_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JLiveAuth = Java.type('io.vertx.ext.auth.oauth2.providers.LiveAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var LiveAuth = function(j_val) {
-
- var j_liveAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_liveAuth;
-};
-
-LiveAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.LiveAuth");
-LiveAuth._jtype = {
- accept: function(obj) {
- return LiveAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(LiveAuth.prototype, {});
- LiveAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-LiveAuth._create = function(jdel) {
- var obj = Object.create(LiveAuth.prototype, {});
- LiveAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for live.com
-
- @memberof module:vertx-auth-oauth2-js/live_auth
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by live.com
- @param clientSecret {string} the client secret given to you by live.com
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-LiveAuth.create = function() {
- var __args = arguments;
- if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JLiveAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2]));
- }else if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && (typeof __args[3] === 'object' && __args[3] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JLiveAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[3]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = LiveAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/mailchimp_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/mailchimp_auth.js
deleted file mode 100644
index 3ed546536..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/mailchimp_auth.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/mailchimp_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JMailchimpAuth = Java.type('io.vertx.ext.auth.oauth2.providers.MailchimpAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var MailchimpAuth = function(j_val) {
-
- var j_mailchimpAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_mailchimpAuth;
-};
-
-MailchimpAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.MailchimpAuth");
-MailchimpAuth._jtype = {
- accept: function(obj) {
- return MailchimpAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(MailchimpAuth.prototype, {});
- MailchimpAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-MailchimpAuth._create = function(jdel) {
- var obj = Object.create(MailchimpAuth.prototype, {});
- MailchimpAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for Dropbox
-
- @memberof module:vertx-auth-oauth2-js/mailchimp_auth
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by Mailchimp
- @param clientSecret {string} the client secret given to you by Mailchimp
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-MailchimpAuth.create = function() {
- var __args = arguments;
- if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JMailchimpAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2]));
- }else if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && (typeof __args[3] === 'object' && __args[3] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JMailchimpAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[3]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = MailchimpAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/o_auth2_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/o_auth2_auth.js
deleted file mode 100644
index cab253801..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/o_auth2_auth.js
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/o_auth2_auth */
-var utils = require('vertx-js/util/utils');
-var User = require('vertx-auth-common-js/user');
-var Vertx = require('vertx-js/vertx');
-var AccessToken = require('vertx-auth-oauth2-js/access_token');
-var AuthProvider = require('vertx-auth-common-js/auth_provider');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JOAuth2Auth = Java.type('io.vertx.ext.auth.oauth2.OAuth2Auth');
-var OAuth2ClientOptions = Java.type('io.vertx.ext.auth.oauth2.OAuth2ClientOptions');
-
-/**
-
- @class
-*/
-var OAuth2Auth = function(j_val) {
-
- var j_oAuth2Auth = j_val;
- var that = this;
- AuthProvider.call(this, j_val);
-
- /**
-
- @public
- @param arg0 {Object}
- @param arg1 {function}
- */
- this.authenticate = function(arg0, arg1) {
- var __args = arguments;
- if (__args.length === 2 && (typeof __args[0] === 'object' && __args[0] != null) && typeof __args[1] === 'function') {
- j_oAuth2Auth["authenticate(io.vertx.core.json.JsonObject,io.vertx.core.Handler)"](utils.convParamJsonObject(arg0), function(ar) {
- if (ar.succeeded()) {
- arg1(utils.convReturnVertxGen(User, ar.result()), null);
- } else {
- arg1(null, ar.cause());
- }
- });
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- /**
- Generate a redirect URL to the authN/Z backend. It only applies to auth_code flow.
-
- @public
- @param params {Object}
- @return {string}
- */
- this.authorizeURL = function(params) {
- var __args = arguments;
- if (__args.length === 1 && (typeof __args[0] === 'object' && __args[0] != null)) {
- return j_oAuth2Auth["authorizeURL(io.vertx.core.json.JsonObject)"](utils.convParamJsonObject(params));
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- /**
- Returns the Access Token object.
-
- @public
- @param params {Object} - JSON with the options, each flow requires different options.
- @param handler {function} - The handler returning the results.
- */
- this.getToken = function(params, handler) {
- var __args = arguments;
- if (__args.length === 2 && (typeof __args[0] === 'object' && __args[0] != null) && typeof __args[1] === 'function') {
- j_oAuth2Auth["getToken(io.vertx.core.json.JsonObject,io.vertx.core.Handler)"](utils.convParamJsonObject(params), function(ar) {
- if (ar.succeeded()) {
- handler(utils.convReturnVertxGen(AccessToken, ar.result()), null);
- } else {
- handler(null, ar.cause());
- }
- });
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- /**
- Call OAuth2 APIs.
-
- @public
- @param method {Object} HttpMethod
- @param path {string} target path
- @param params {Object} parameters
- @param handler {function} handler
- @return {OAuth2Auth} self
- */
- this.api = function(method, path, params, handler) {
- var __args = arguments;
- if (__args.length === 4 && typeof __args[0] === 'string' && typeof __args[1] === 'string' && (typeof __args[2] === 'object' && __args[2] != null) && typeof __args[3] === 'function') {
- j_oAuth2Auth["api(io.vertx.core.http.HttpMethod,java.lang.String,io.vertx.core.json.JsonObject,io.vertx.core.Handler)"](io.vertx.core.http.HttpMethod.valueOf(method), path, utils.convParamJsonObject(params), function(ar) {
- if (ar.succeeded()) {
- handler(utils.convReturnJson(ar.result()), null);
- } else {
- handler(null, ar.cause());
- }
- });
- return that;
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- /**
- Returns true if this provider supports JWT tokens as the access_token. This is typically true if the provider
- implements the `openid-connect` protocol. This is a plain return from the config option jwtToken, which is false
- by default.
-
- This information is important to validate grants. Since pure OAuth2 should be used for authorization and when a
- token is requested all grants should be declared, in case of openid-connect this is not true. OpenId will issue
- a token and all grants will be encoded on the token itself so the requester does not need to list the required
- grants.
-
- @public
-
- @return {boolean} true if openid-connect is used.
- */
- this.hasJWTToken = function() {
- var __args = arguments;
- if (__args.length === 0) {
- return j_oAuth2Auth["hasJWTToken()"]();
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- /**
- Decode a token to a {@link AccessToken} object. This is useful to handle bearer JWT tokens.
-
- @public
- @param token {string} the access token (base64 string)
- @param handler {function} A handler to receive the event
- @return {OAuth2Auth} self
- */
- this.decodeToken = function(token, handler) {
- var __args = arguments;
- if (__args.length === 2 && typeof __args[0] === 'string' && typeof __args[1] === 'function') {
- j_oAuth2Auth["decodeToken(java.lang.String,io.vertx.core.Handler)"](token, function(ar) {
- if (ar.succeeded()) {
- handler(utils.convReturnVertxGen(AccessToken, ar.result()), null);
- } else {
- handler(null, ar.cause());
- }
- });
- return that;
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- /**
- 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.
-
- @public
- @param token {string} the access token (base64 string)
- @param tokenType {string} hint to the token type e.g.: `access_token`
- @param handler {function} A handler to receive the event
- @return {OAuth2Auth} self
- */
- this.introspectToken = function() {
- var __args = arguments;
- if (__args.length === 2 && typeof __args[0] === 'string' && typeof __args[1] === 'function') {
- j_oAuth2Auth["introspectToken(java.lang.String,io.vertx.core.Handler)"](__args[0], function(ar) {
- if (ar.succeeded()) {
- __args[1](utils.convReturnVertxGen(AccessToken, ar.result()), null);
- } else {
- __args[1](null, ar.cause());
- }
- });
- return that;
- } else if (__args.length === 3 && typeof __args[0] === 'string' && typeof __args[1] === 'string' && typeof __args[2] === 'function') {
- j_oAuth2Auth["introspectToken(java.lang.String,java.lang.String,io.vertx.core.Handler)"](__args[0], __args[1], function(ar) {
- if (ar.succeeded()) {
- __args[2](utils.convReturnJson(ar.result()), null);
- } else {
- __args[2](null, ar.cause());
- }
- });
- return that;
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- /**
- Returns the scope separator.
-
- The RFC 6749 states that a scope is expressed as a set of case-sensitive and space-delimited strings, however
- vendors tend not to agree on this and we see the following cases being used: space, plus sign, comma.
-
- @public
-
- @return {string} what value was used in the configuration of the object, falling back to the default value which is a space.
- */
- this.getScopeSeparator = function() {
- var __args = arguments;
- if (__args.length === 0) {
- return j_oAuth2Auth["getScopeSeparator()"]();
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_oAuth2Auth;
-};
-
-OAuth2Auth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.OAuth2Auth");
-OAuth2Auth._jtype = {
- accept: function(obj) {
- return OAuth2Auth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(OAuth2Auth.prototype, {});
- OAuth2Auth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-OAuth2Auth._create = function(jdel) {
- var obj = Object.create(OAuth2Auth.prototype, {});
- OAuth2Auth.apply(obj, arguments);
- return obj;
-}
-/**
-
- @memberof module:vertx-auth-oauth2-js/o_auth2_auth
- @param vertx {Vertx} the Vertx instance
- @param flow {Object}
- @param config {Object} the config as exported from the admin console
- @return {OAuth2Auth} the auth provider
- */
-OAuth2Auth.createKeycloak = function(vertx, flow, config) {
- var __args = arguments;
- if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && (typeof __args[2] === 'object' && __args[2] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JOAuth2Auth["createKeycloak(io.vertx.core.Vertx,io.vertx.ext.auth.oauth2.OAuth2FlowType,io.vertx.core.json.JsonObject)"](vertx._jdel, io.vertx.ext.auth.oauth2.OAuth2FlowType.valueOf(flow), utils.convParamJsonObject(config)));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-/**
- Create a OAuth2 auth provider
-
- @memberof module:vertx-auth-oauth2-js/o_auth2_auth
- @param vertx {Vertx} the Vertx instance
- @param flow {Object}
- @param config {Object} the config
- @return {OAuth2Auth} the auth provider
- */
-OAuth2Auth.create = function() {
- var __args = arguments;
- if (__args.length === 2 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JOAuth2Auth["create(io.vertx.core.Vertx,io.vertx.ext.auth.oauth2.OAuth2FlowType)"](__args[0]._jdel, io.vertx.ext.auth.oauth2.OAuth2FlowType.valueOf(__args[1])));
- }else if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && (typeof __args[2] === 'object' && __args[2] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JOAuth2Auth["create(io.vertx.core.Vertx,io.vertx.ext.auth.oauth2.OAuth2FlowType,io.vertx.ext.auth.oauth2.OAuth2ClientOptions)"](__args[0]._jdel, io.vertx.ext.auth.oauth2.OAuth2FlowType.valueOf(__args[1]), __args[2] != null ? new OAuth2ClientOptions(new JsonObject(Java.asJSONCompatible(__args[2]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = OAuth2Auth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/salesforce_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/salesforce_auth.js
deleted file mode 100644
index 56fd4fc2c..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/salesforce_auth.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/salesforce_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JSalesforceAuth = Java.type('io.vertx.ext.auth.oauth2.providers.SalesforceAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var SalesforceAuth = function(j_val) {
-
- var j_salesforceAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_salesforceAuth;
-};
-
-SalesforceAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.SalesforceAuth");
-SalesforceAuth._jtype = {
- accept: function(obj) {
- return SalesforceAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(SalesforceAuth.prototype, {});
- SalesforceAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-SalesforceAuth._create = function(jdel) {
- var obj = Object.create(SalesforceAuth.prototype, {});
- SalesforceAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for Salesforce
-
- @memberof module:vertx-auth-oauth2-js/salesforce_auth
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by Salesforce
- @param clientSecret {string} the client secret given to you by Salesforce
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-SalesforceAuth.create = function() {
- var __args = arguments;
- if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JSalesforceAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2]));
- }else if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && (typeof __args[3] === 'object' && __args[3] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JSalesforceAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[3]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = SalesforceAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/shopify_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/shopify_auth.js
deleted file mode 100644
index 527b4dde2..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/shopify_auth.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/shopify_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JShopifyAuth = Java.type('io.vertx.ext.auth.oauth2.providers.ShopifyAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var ShopifyAuth = function(j_val) {
-
- var j_shopifyAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_shopifyAuth;
-};
-
-ShopifyAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.ShopifyAuth");
-ShopifyAuth._jtype = {
- accept: function(obj) {
- return ShopifyAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(ShopifyAuth.prototype, {});
- ShopifyAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-ShopifyAuth._create = function(jdel) {
- var obj = Object.create(ShopifyAuth.prototype, {});
- ShopifyAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for Shopify
-
- @memberof module:vertx-auth-oauth2-js/shopify_auth
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by Shopify
- @param clientSecret {string} the client secret given to you by Shopify
- @param shop {string} your shop name
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-ShopifyAuth.create = function() {
- var __args = arguments;
- if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && typeof __args[3] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JShopifyAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2], __args[3]));
- }else if (__args.length === 5 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && typeof __args[3] === 'string' && (typeof __args[4] === 'object' && __args[4] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JShopifyAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3], __args[4] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[4]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = ShopifyAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/soundcloud_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/soundcloud_auth.js
deleted file mode 100644
index 23c33f0df..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/soundcloud_auth.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/soundcloud_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JSoundcloudAuth = Java.type('io.vertx.ext.auth.oauth2.providers.SoundcloudAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var SoundcloudAuth = function(j_val) {
-
- var j_soundcloudAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_soundcloudAuth;
-};
-
-SoundcloudAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.SoundcloudAuth");
-SoundcloudAuth._jtype = {
- accept: function(obj) {
- return SoundcloudAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(SoundcloudAuth.prototype, {});
- SoundcloudAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-SoundcloudAuth._create = function(jdel) {
- var obj = Object.create(SoundcloudAuth.prototype, {});
- SoundcloudAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for Dropbox
-
- @memberof module:vertx-auth-oauth2-js/soundcloud_auth
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by SoundCloud
- @param clientSecret {string} the client secret given to you by SoundCloud
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-SoundcloudAuth.create = function() {
- var __args = arguments;
- if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JSoundcloudAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2]));
- }else if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && (typeof __args[3] === 'object' && __args[3] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JSoundcloudAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[3]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = SoundcloudAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/stripe_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/stripe_auth.js
deleted file mode 100644
index f9e62043d..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/stripe_auth.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/stripe_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JStripeAuth = Java.type('io.vertx.ext.auth.oauth2.providers.StripeAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var StripeAuth = function(j_val) {
-
- var j_stripeAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_stripeAuth;
-};
-
-StripeAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.StripeAuth");
-StripeAuth._jtype = {
- accept: function(obj) {
- return StripeAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(StripeAuth.prototype, {});
- StripeAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-StripeAuth._create = function(jdel) {
- var obj = Object.create(StripeAuth.prototype, {});
- StripeAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for Dropbox
-
- @memberof module:vertx-auth-oauth2-js/stripe_auth
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by Stripe
- @param clientSecret {string} the client secret given to you by Stripe
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-StripeAuth.create = function() {
- var __args = arguments;
- if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JStripeAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2]));
- }else if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && (typeof __args[3] === 'object' && __args[3] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JStripeAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[3]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = StripeAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/twitter_auth.js b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/twitter_auth.js
deleted file mode 100644
index 2283f6a8c..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2-js/twitter_auth.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-oauth2-js/twitter_auth */
-var utils = require('vertx-js/util/utils');
-var Vertx = require('vertx-js/vertx');
-var OAuth2Auth = require('vertx-auth-oauth2-js/o_auth2_auth');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JTwitterAuth = Java.type('io.vertx.ext.auth.oauth2.providers.TwitterAuth');
-var HttpClientOptions = Java.type('io.vertx.core.http.HttpClientOptions');
-
-/**
-
- @class
-*/
-var TwitterAuth = function(j_val) {
-
- var j_twitterAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_twitterAuth;
-};
-
-TwitterAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.oauth2.providers.TwitterAuth");
-TwitterAuth._jtype = {
- accept: function(obj) {
- return TwitterAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(TwitterAuth.prototype, {});
- TwitterAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-TwitterAuth._create = function(jdel) {
- var obj = Object.create(TwitterAuth.prototype, {});
- TwitterAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a OAuth2Auth provider for Twitter
-
- @memberof module:vertx-auth-oauth2-js/twitter_auth
- @param vertx {Vertx}
- @param clientId {string} the client id given to you by Twitter
- @param clientSecret {string} the client secret given to you by Twitter
- @param httpClientOptions {Object} custom http client options
- @return {OAuth2Auth}
- */
-TwitterAuth.create = function() {
- var __args = arguments;
- if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string') {
- return utils.convReturnVertxGen(OAuth2Auth, JTwitterAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2]));
- }else if (__args.length === 4 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string' && (typeof __args[3] === 'object' && __args[3] != null)) {
- return utils.convReturnVertxGen(OAuth2Auth, JTwitterAuth["create(io.vertx.core.Vertx,java.lang.String,java.lang.String,io.vertx.core.http.HttpClientOptions)"](__args[0]._jdel, __args[1], __args[2], __args[3] != null ? new HttpClientOptions(new JsonObject(Java.asJSONCompatible(__args[3]))) : null));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = TwitterAuth;
\ No newline at end of file
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/access_token.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/access_token.rb
deleted file mode 100644
index a6750e130..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/access_token.rb
+++ /dev/null
@@ -1,119 +0,0 @@
-require 'vertx-auth-common/user'
-require 'vertx-auth-common/auth_provider'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.AccessToken
-module VertxAuthOauth2
- # AccessToken extension to the User interface
- class AccessToken < ::VertxAuthCommon::User
- # @private
- # @param j_del [::VertxAuthOauth2::AccessToken] the java delegate
- def initialize(j_del)
- super(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::AccessToken] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == AccessToken
- end
- def @@j_api_type.wrap(obj)
- AccessToken.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2::AccessToken.java_class
- end
- # @param [String] arg0
- # @yield
- # @return [self]
- def is_authorised(arg0=nil)
- if arg0.class == String && block_given?
- @j_del.java_method(:isAuthorised, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(arg0,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
- return self
- end
- raise ArgumentError, "Invalid arguments when calling is_authorised(#{arg0})"
- end
- # @return [self]
- def clear_cache
- if !block_given?
- @j_del.java_method(:clearCache, []).call()
- return self
- end
- raise ArgumentError, "Invalid arguments when calling clear_cache()"
- end
- # @return [Hash{String => Object}]
- def principal
- if !block_given?
- return @j_del.java_method(:principal, []).call() != nil ? JSON.parse(@j_del.java_method(:principal, []).call().encode) : nil
- end
- raise ArgumentError, "Invalid arguments when calling principal()"
- end
- # @param [::VertxAuthCommon::AuthProvider] arg0
- # @return [void]
- def set_auth_provider(arg0=nil)
- if arg0.class.method_defined?(:j_del) && !block_given?
- return @j_del.java_method(:setAuthProvider, [Java::IoVertxExtAuth::AuthProvider.java_class]).call(arg0.j_del)
- end
- raise ArgumentError, "Invalid arguments when calling set_auth_provider(#{arg0})"
- end
- # Check if the access token is expired or not.
- # @return [true,false]
- def expired?
- if !block_given?
- return @j_del.java_method(:expired, []).call()
- end
- raise ArgumentError, "Invalid arguments when calling expired?()"
- end
- # Refresh the access token
- # @yield - The callback function returning the results.
- # @return [self]
- def refresh
- if block_given?
- @j_del.java_method(:refresh, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
- return self
- end
- raise ArgumentError, "Invalid arguments when calling refresh()"
- end
- # Revoke access or refresh token
- # @param [String] token_type - A String containing the type of token to revoke. Should be either "access_token" or "refresh_token".
- # @yield - The callback function returning the results.
- # @return [self]
- def revoke(token_type=nil)
- if token_type.class == String && block_given?
- @j_del.java_method(:revoke, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(token_type,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
- return self
- end
- raise ArgumentError, "Invalid arguments when calling revoke(#{token_type})"
- end
- # Revoke refresh token and calls the logout endpoint. This is a openid-connect extension and might not be
- # available on all providers.
- # @yield - The callback function returning the results.
- # @return [self]
- def logout
- if block_given?
- @j_del.java_method(:logout, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
- return self
- end
- raise ArgumentError, "Invalid arguments when calling logout()"
- end
- # Introspect access token. This is an OAuth2 extension that allow to verify if an access token is still valid.
- # @yield - The callback function returning the results.
- # @return [self]
- def introspect
- if block_given?
- @j_del.java_method(:introspect, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
- return self
- end
- raise ArgumentError, "Invalid arguments when calling introspect()"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/azure_ad_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/azure_ad_auth.rb
deleted file mode 100644
index a4bfd41dc..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/azure_ad_auth.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.AzureADAuth
-module VertxAuthOauth2
- # Simplified factory to create an for Azure AD.
- class AzureADAuth
- # @private
- # @param j_del [::VertxAuthOauth2::AzureADAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::AzureADAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == AzureADAuth
- end
- def @@j_api_type.wrap(obj)
- AzureADAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::AzureADAuth.java_class
- end
- # Create a OAuth2Auth provider for Microsoft Azure Active Directory
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by Azure
- # @param [String] clientSecret the client secret given to you by Azure
- # @param [String] guid the guid of your application given to you by Azure
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(vertx=nil,clientId=nil,clientSecret=nil,guid=nil,httpClientOptions=nil)
- if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && guid.class == String && !block_given? && httpClientOptions == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::AzureADAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret,guid),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && guid.class == String && httpClientOptions.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::AzureADAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,guid,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{guid},#{httpClientOptions})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/box_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/box_auth.rb
deleted file mode 100644
index a7f930e99..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/box_auth.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.BoxAuth
-module VertxAuthOauth2
- # Simplified factory to create an for box.com.
- class BoxAuth
- # @private
- # @param j_del [::VertxAuthOauth2::BoxAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::BoxAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == BoxAuth
- end
- def @@j_api_type.wrap(obj)
- BoxAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::BoxAuth.java_class
- end
- # Create a OAuth2Auth provider for App.net
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by box.com
- # @param [String] clientSecret the client secret given to you by box.com
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(vertx=nil,clientId=nil,clientSecret=nil,httpClientOptions=nil)
- if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && !block_given? && httpClientOptions == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::BoxAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && httpClientOptions.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::BoxAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{httpClientOptions})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/cloud_foundry_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/cloud_foundry_auth.rb
deleted file mode 100644
index 50187f364..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/cloud_foundry_auth.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.CloudFoundryAuth
-module VertxAuthOauth2
- # Simplified factory to create an for CloudFoundry UAA.
- class CloudFoundryAuth
- # @private
- # @param j_del [::VertxAuthOauth2::CloudFoundryAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::CloudFoundryAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == CloudFoundryAuth
- end
- def @@j_api_type.wrap(obj)
- CloudFoundryAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::CloudFoundryAuth.java_class
- end
- # Create a OAuth2Auth provider for CloudFoundry UAA
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by CloudFoundry UAA
- # @param [String] clientSecret the client secret given to you by CloudFoundry UAA
- # @param [String] uuaURL the url to your UUA server instance
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(vertx=nil,clientId=nil,clientSecret=nil,uuaURL=nil,httpClientOptions=nil)
- if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && uuaURL.class == String && !block_given? && httpClientOptions == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::CloudFoundryAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret,uuaURL),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && uuaURL.class == String && httpClientOptions.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::CloudFoundryAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,uuaURL,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{uuaURL},#{httpClientOptions})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/cloud_foundry_uaa.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/cloud_foundry_uaa.rb
deleted file mode 100644
index 58bb69c37..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/cloud_foundry_uaa.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.CloudFoundryAuth
-module VertxAuthOauth2
- # Simplified factory to create an for CloudFoundry UAA.
- class CloudFoundryUAA
- # @private
- # @param j_del [::VertxAuthOauth2::CloudFoundryUAA] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::CloudFoundryUAA] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == CloudFoundryUAA
- end
- def @@j_api_type.wrap(obj)
- CloudFoundryUAA.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::CloudFoundryUAA.java_class
- end
- # Create a OAuth2Auth provider for CloudFoundry UAA
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by CloudFoundry UAA
- # @param [String] clientSecret the client secret given to you by CloudFoundry UAA
- # @param [String] uuaURL the url to your UUA server instance
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(vertx=nil,clientId=nil,clientSecret=nil,uuaURL=nil,httpClientOptions=nil)
- if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && uuaURL.class == String && !block_given? && httpClientOptions == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::CloudFoundryUAA.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret,uuaURL),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && uuaURL.class == String && httpClientOptions.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::CloudFoundryUAA.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,uuaURL,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{uuaURL},#{httpClientOptions})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/dropbox_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/dropbox_auth.rb
deleted file mode 100644
index 55f5db436..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/dropbox_auth.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.DropboxAuth
-module VertxAuthOauth2
- # Simplified factory to create an for Dropbox.
- class DropboxAuth
- # @private
- # @param j_del [::VertxAuthOauth2::DropboxAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::DropboxAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == DropboxAuth
- end
- def @@j_api_type.wrap(obj)
- DropboxAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::DropboxAuth.java_class
- end
- # Create a OAuth2Auth provider for Dropbox
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by Dropbox
- # @param [String] clientSecret the client secret given to you by Dropbox
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(vertx=nil,clientId=nil,clientSecret=nil,httpClientOptions=nil)
- if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && !block_given? && httpClientOptions == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::DropboxAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && httpClientOptions.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::DropboxAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{httpClientOptions})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/facebook_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/facebook_auth.rb
deleted file mode 100644
index ccec771c3..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/facebook_auth.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.FacebookAuth
-module VertxAuthOauth2
- # Simplified factory to create an for Facebook.
- class FacebookAuth
- # @private
- # @param j_del [::VertxAuthOauth2::FacebookAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::FacebookAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == FacebookAuth
- end
- def @@j_api_type.wrap(obj)
- FacebookAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::FacebookAuth.java_class
- end
- # Create a OAuth2Auth provider for Facebook
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by Facebook
- # @param [String] clientSecret the client secret given to you by Facebook
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(vertx=nil,clientId=nil,clientSecret=nil,httpClientOptions=nil)
- if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && !block_given? && httpClientOptions == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::FacebookAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && httpClientOptions.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::FacebookAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{httpClientOptions})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/foursquare_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/foursquare_auth.rb
deleted file mode 100644
index d8ccc4257..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/foursquare_auth.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.FoursquareAuth
-module VertxAuthOauth2
- # Simplified factory to create an for Dropbox.
- class FoursquareAuth
- # @private
- # @param j_del [::VertxAuthOauth2::FoursquareAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::FoursquareAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == FoursquareAuth
- end
- def @@j_api_type.wrap(obj)
- FoursquareAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::FoursquareAuth.java_class
- end
- # Create a OAuth2Auth provider for Dropbox
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by Dropbox
- # @param [String] clientSecret the client secret given to you by Dropbox
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(vertx=nil,clientId=nil,clientSecret=nil,httpClientOptions=nil)
- if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && !block_given? && httpClientOptions == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::FoursquareAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && httpClientOptions.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::FoursquareAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{httpClientOptions})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/github_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/github_auth.rb
deleted file mode 100644
index 47ee087aa..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/github_auth.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.GithubAuth
-module VertxAuthOauth2
- # Simplified factory to create an for Github.
- class GithubAuth
- # @private
- # @param j_del [::VertxAuthOauth2::GithubAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::GithubAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == GithubAuth
- end
- def @@j_api_type.wrap(obj)
- GithubAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::GithubAuth.java_class
- end
- # Create a OAuth2Auth provider for Gtihub
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by Github
- # @param [String] clientSecret the client secret given to you by Github
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(vertx=nil,clientId=nil,clientSecret=nil,httpClientOptions=nil)
- if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && !block_given? && httpClientOptions == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::GithubAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && httpClientOptions.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::GithubAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{httpClientOptions})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/google_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/google_auth.rb
deleted file mode 100644
index 4f8747a51..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/google_auth.rb
+++ /dev/null
@@ -1,65 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.GoogleAuth
-module VertxAuthOauth2
- # Simplified factory to create an {::VertxAuthOauth2::OAuth2Auth} for Google.
- class GoogleAuth
- # @private
- # @param j_del [::VertxAuthOauth2::GoogleAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::GoogleAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == GoogleAuth
- end
- def @@j_api_type.wrap(obj)
- GoogleAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::GoogleAuth.java_class
- end
- # Create a OAuth2Auth provider for Google
- # @overload create(vertx,serviceAccountJson)
- # @param [::Vertx::Vertx] vertx
- # @param [Hash{String => Object}] serviceAccountJson the configuration json file from your Google API page
- # @overload create(vertx,clientId,clientSecret)
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by Google
- # @param [String] clientSecret the client secret given to you by Google
- # @overload create(vertx,serviceAccountJson,httpClientOptions)
- # @param [::Vertx::Vertx] vertx
- # @param [Hash{String => Object}] serviceAccountJson the configuration json file from your Google API page
- # @param [Hash] httpClientOptions custom http client options
- # @overload create(vertx,clientId,clientSecret,httpClientOptions)
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by Google
- # @param [String] clientSecret the client secret given to you by Google
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(param_1=nil,param_2=nil,param_3=nil,param_4=nil)
- if param_1.class.method_defined?(:j_del) && param_2.class == Hash && !block_given? && param_3 == nil && param_4 == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::GoogleAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxCoreJson::JsonObject.java_class]).call(param_1.j_del,::Vertx::Util::Utils.to_json_object(param_2)),::VertxAuthOauth2::OAuth2Auth)
- elsif param_1.class.method_defined?(:j_del) && param_2.class == String && param_3.class == String && !block_given? && param_4 == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::GoogleAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(param_1.j_del,param_2,param_3),::VertxAuthOauth2::OAuth2Auth)
- elsif param_1.class.method_defined?(:j_del) && param_2.class == Hash && param_3.class == Hash && !block_given? && param_4 == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::GoogleAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(param_1.j_del,::Vertx::Util::Utils.to_json_object(param_2),Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(param_3))),::VertxAuthOauth2::OAuth2Auth)
- elsif param_1.class.method_defined?(:j_del) && param_2.class == String && param_3.class == String && param_4.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::GoogleAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(param_1.j_del,param_2,param_3,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(param_4))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{param_1},#{param_2},#{param_3},#{param_4})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/heroku_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/heroku_auth.rb
deleted file mode 100644
index d92baa680..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/heroku_auth.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.HerokuAuth
-module VertxAuthOauth2
- # Simplified factory to create an for Heroku.
- class HerokuAuth
- # @private
- # @param j_del [::VertxAuthOauth2::HerokuAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::HerokuAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == HerokuAuth
- end
- def @@j_api_type.wrap(obj)
- HerokuAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::HerokuAuth.java_class
- end
- # Create a OAuth2Auth provider for live.com
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by Heroku
- # @param [String] clientSecret the client secret given to you by Heroku
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(vertx=nil,clientId=nil,clientSecret=nil,httpClientOptions=nil)
- if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && !block_given? && httpClientOptions == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::HerokuAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && httpClientOptions.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::HerokuAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{httpClientOptions})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/instagram_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/instagram_auth.rb
deleted file mode 100644
index d2d197de3..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/instagram_auth.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.InstagramAuth
-module VertxAuthOauth2
- # Simplified factory to create an for Instagram.
- class InstagramAuth
- # @private
- # @param j_del [::VertxAuthOauth2::InstagramAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::InstagramAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == InstagramAuth
- end
- def @@j_api_type.wrap(obj)
- InstagramAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::InstagramAuth.java_class
- end
- # Create a OAuth2Auth provider for Instagram
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by Instagram
- # @param [String] clientSecret the client secret given to you by Instagram
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(vertx=nil,clientId=nil,clientSecret=nil,httpClientOptions=nil)
- if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && !block_given? && httpClientOptions == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::InstagramAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && httpClientOptions.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::InstagramAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{httpClientOptions})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/keycloak_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/keycloak_auth.rb
deleted file mode 100644
index 0a602a672..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/keycloak_auth.rb
+++ /dev/null
@@ -1,65 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.KeycloakAuth
-module VertxAuthOauth2
- # Simplified factory to create an for Keycloak.
- class KeycloakAuth
- # @private
- # @param j_del [::VertxAuthOauth2::KeycloakAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::KeycloakAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == KeycloakAuth
- end
- def @@j_api_type.wrap(obj)
- KeycloakAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::KeycloakAuth.java_class
- end
- # Create a OAuth2Auth provider for Keycloak
- # @overload create(vertx,config)
- # @param [::Vertx::Vertx] vertx
- # @param [Hash{String => Object}] config the json config file exported from Keycloak admin console
- # @overload create(vertx,flow,config)
- # @param [::Vertx::Vertx] vertx
- # @param [:AUTH_CODE,:CLIENT,:PASSWORD,:AUTH_JWT] flow the oauth2 flow to use
- # @param [Hash{String => Object}] config the json config file exported from Keycloak admin console
- # @overload create(vertx,config,httpClientOptions)
- # @param [::Vertx::Vertx] vertx
- # @param [Hash{String => Object}] config the json config file exported from Keycloak admin console
- # @param [Hash] httpClientOptions custom http client options
- # @overload create(vertx,flow,config,httpClientOptions)
- # @param [::Vertx::Vertx] vertx
- # @param [:AUTH_CODE,:CLIENT,:PASSWORD,:AUTH_JWT] flow the oauth2 flow to use
- # @param [Hash{String => Object}] config the json config file exported from Keycloak admin console
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(param_1=nil,param_2=nil,param_3=nil,param_4=nil)
- if param_1.class.method_defined?(:j_del) && param_2.class == Hash && !block_given? && param_3 == nil && param_4 == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::KeycloakAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxCoreJson::JsonObject.java_class]).call(param_1.j_del,::Vertx::Util::Utils.to_json_object(param_2)),::VertxAuthOauth2::OAuth2Auth)
- elsif param_1.class.method_defined?(:j_del) && param_2.class == Symbol && param_3.class == Hash && !block_given? && param_4 == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::KeycloakAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtAuthOauth2::OAuth2FlowType.java_class,Java::IoVertxCoreJson::JsonObject.java_class]).call(param_1.j_del,Java::IoVertxExtAuthOauth2::OAuth2FlowType.valueOf(param_2.to_s),::Vertx::Util::Utils.to_json_object(param_3)),::VertxAuthOauth2::OAuth2Auth)
- elsif param_1.class.method_defined?(:j_del) && param_2.class == Hash && param_3.class == Hash && !block_given? && param_4 == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::KeycloakAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(param_1.j_del,::Vertx::Util::Utils.to_json_object(param_2),Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(param_3))),::VertxAuthOauth2::OAuth2Auth)
- elsif param_1.class.method_defined?(:j_del) && param_2.class == Symbol && param_3.class == Hash && param_4.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::KeycloakAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtAuthOauth2::OAuth2FlowType.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(param_1.j_del,Java::IoVertxExtAuthOauth2::OAuth2FlowType.valueOf(param_2.to_s),::Vertx::Util::Utils.to_json_object(param_3),Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(param_4))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{param_1},#{param_2},#{param_3},#{param_4})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/keycloak_helper.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/keycloak_helper.rb
deleted file mode 100644
index f851bcef2..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/keycloak_helper.rb
+++ /dev/null
@@ -1,143 +0,0 @@
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.KeycloakHelper
-module VertxAuthOauth2
- # Helper class for processing Keycloak principal.
- class KeycloakHelper
- # @private
- # @param j_del [::VertxAuthOauth2::KeycloakHelper] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::KeycloakHelper] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == KeycloakHelper
- end
- def @@j_api_type.wrap(obj)
- KeycloakHelper.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2::KeycloakHelper.java_class
- end
- # Get raw `id_token` string from the principal.
- # @param [Hash{String => Object}] principal user principal
- # @return [String] the raw id token string
- def self.raw_id_token(principal=nil)
- if principal.class == Hash && !block_given?
- return Java::IoVertxExtAuthOauth2::KeycloakHelper.java_method(:rawIdToken, [Java::IoVertxCoreJson::JsonObject.java_class]).call(::Vertx::Util::Utils.to_json_object(principal))
- end
- raise ArgumentError, "Invalid arguments when calling raw_id_token(#{principal})"
- end
- # Get decoded `id_token` from the principal.
- # @param [Hash{String => Object}] principal user principal
- # @return [Hash{String => Object}] the id token
- def self.id_token(principal=nil)
- if principal.class == Hash && !block_given?
- return Java::IoVertxExtAuthOauth2::KeycloakHelper.java_method(:idToken, [Java::IoVertxCoreJson::JsonObject.java_class]).call(::Vertx::Util::Utils.to_json_object(principal)) != nil ? JSON.parse(Java::IoVertxExtAuthOauth2::KeycloakHelper.java_method(:idToken, [Java::IoVertxCoreJson::JsonObject.java_class]).call(::Vertx::Util::Utils.to_json_object(principal)).encode) : nil
- end
- raise ArgumentError, "Invalid arguments when calling id_token(#{principal})"
- end
- # Get raw `access_token` string from the principal.
- # @param [Hash{String => Object}] principal user principal
- # @return [String] the raw access token string
- def self.raw_access_token(principal=nil)
- if principal.class == Hash && !block_given?
- return Java::IoVertxExtAuthOauth2::KeycloakHelper.java_method(:rawAccessToken, [Java::IoVertxCoreJson::JsonObject.java_class]).call(::Vertx::Util::Utils.to_json_object(principal))
- end
- raise ArgumentError, "Invalid arguments when calling raw_access_token(#{principal})"
- end
- # Get decoded `access_token` from the principal.
- # @param [Hash{String => Object}] principal user principal
- # @return [Hash{String => Object}] the access token
- def self.access_token(principal=nil)
- if principal.class == Hash && !block_given?
- return Java::IoVertxExtAuthOauth2::KeycloakHelper.java_method(:accessToken, [Java::IoVertxCoreJson::JsonObject.java_class]).call(::Vertx::Util::Utils.to_json_object(principal)) != nil ? JSON.parse(Java::IoVertxExtAuthOauth2::KeycloakHelper.java_method(:accessToken, [Java::IoVertxCoreJson::JsonObject.java_class]).call(::Vertx::Util::Utils.to_json_object(principal)).encode) : nil
- end
- raise ArgumentError, "Invalid arguments when calling access_token(#{principal})"
- end
- # @param [Hash{String => Object}] principal
- # @return [Fixnum]
- def self.auth_time(principal=nil)
- if principal.class == Hash && !block_given?
- return Java::IoVertxExtAuthOauth2::KeycloakHelper.java_method(:authTime, [Java::IoVertxCoreJson::JsonObject.java_class]).call(::Vertx::Util::Utils.to_json_object(principal))
- end
- raise ArgumentError, "Invalid arguments when calling auth_time(#{principal})"
- end
- # @param [Hash{String => Object}] principal
- # @return [String]
- def self.session_state(principal=nil)
- if principal.class == Hash && !block_given?
- return Java::IoVertxExtAuthOauth2::KeycloakHelper.java_method(:sessionState, [Java::IoVertxCoreJson::JsonObject.java_class]).call(::Vertx::Util::Utils.to_json_object(principal))
- end
- raise ArgumentError, "Invalid arguments when calling session_state(#{principal})"
- end
- # @param [Hash{String => Object}] principal
- # @return [String]
- def self.acr(principal=nil)
- if principal.class == Hash && !block_given?
- return Java::IoVertxExtAuthOauth2::KeycloakHelper.java_method(:acr, [Java::IoVertxCoreJson::JsonObject.java_class]).call(::Vertx::Util::Utils.to_json_object(principal))
- end
- raise ArgumentError, "Invalid arguments when calling acr(#{principal})"
- end
- # @param [Hash{String => Object}] principal
- # @return [String]
- def self.name(principal=nil)
- if principal.class == Hash && !block_given?
- return Java::IoVertxExtAuthOauth2::KeycloakHelper.java_method(:name, [Java::IoVertxCoreJson::JsonObject.java_class]).call(::Vertx::Util::Utils.to_json_object(principal))
- end
- raise ArgumentError, "Invalid arguments when calling name(#{principal})"
- end
- # @param [Hash{String => Object}] principal
- # @return [String]
- def self.email(principal=nil)
- if principal.class == Hash && !block_given?
- return Java::IoVertxExtAuthOauth2::KeycloakHelper.java_method(:email, [Java::IoVertxCoreJson::JsonObject.java_class]).call(::Vertx::Util::Utils.to_json_object(principal))
- end
- raise ArgumentError, "Invalid arguments when calling email(#{principal})"
- end
- # @param [Hash{String => Object}] principal
- # @return [String]
- def self.preferred_username(principal=nil)
- if principal.class == Hash && !block_given?
- return Java::IoVertxExtAuthOauth2::KeycloakHelper.java_method(:preferredUsername, [Java::IoVertxCoreJson::JsonObject.java_class]).call(::Vertx::Util::Utils.to_json_object(principal))
- end
- raise ArgumentError, "Invalid arguments when calling preferred_username(#{principal})"
- end
- # @param [Hash{String => Object}] principal
- # @return [String]
- def self.nick_name(principal=nil)
- if principal.class == Hash && !block_given?
- return Java::IoVertxExtAuthOauth2::KeycloakHelper.java_method(:nickName, [Java::IoVertxCoreJson::JsonObject.java_class]).call(::Vertx::Util::Utils.to_json_object(principal))
- end
- raise ArgumentError, "Invalid arguments when calling nick_name(#{principal})"
- end
- # @param [Hash{String => Object}] principal
- # @return [Set]
- def self.allowed_origins(principal=nil)
- if principal.class == Hash && !block_given?
- return ::Vertx::Util::Utils.to_set(Java::IoVertxExtAuthOauth2::KeycloakHelper.java_method(:allowedOrigins, [Java::IoVertxCoreJson::JsonObject.java_class]).call(::Vertx::Util::Utils.to_json_object(principal))).map! { |elt| elt }
- end
- raise ArgumentError, "Invalid arguments when calling allowed_origins(#{principal})"
- end
- # Parse the token string with base64 decoder.
- # This will only obtain the "payload" part of the token.
- # @param [String] token token string
- # @return [Hash{String => Object}] token payload json object
- def self.parse_token(token=nil)
- if token.class == String && !block_given?
- return Java::IoVertxExtAuthOauth2::KeycloakHelper.java_method(:parseToken, [Java::java.lang.String.java_class]).call(token) != nil ? JSON.parse(Java::IoVertxExtAuthOauth2::KeycloakHelper.java_method(:parseToken, [Java::java.lang.String.java_class]).call(token).encode) : nil
- end
- raise ArgumentError, "Invalid arguments when calling parse_token(#{token})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/linked_in_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/linked_in_auth.rb
deleted file mode 100644
index f4d0ee67a..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/linked_in_auth.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.LinkedInAuth
-module VertxAuthOauth2
- # Simplified factory to create an for LinkedIn.
- class LinkedInAuth
- # @private
- # @param j_del [::VertxAuthOauth2::LinkedInAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::LinkedInAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == LinkedInAuth
- end
- def @@j_api_type.wrap(obj)
- LinkedInAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::LinkedInAuth.java_class
- end
- # Create a OAuth2Auth provider for LinkedIn
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by LinkedIn
- # @param [String] clientSecret the client secret given to you by LinkedIn
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(vertx=nil,clientId=nil,clientSecret=nil,httpClientOptions=nil)
- if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && !block_given? && httpClientOptions == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::LinkedInAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && httpClientOptions.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::LinkedInAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{httpClientOptions})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/live_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/live_auth.rb
deleted file mode 100644
index 73d80760f..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/live_auth.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.LiveAuth
-module VertxAuthOauth2
- # Simplified factory to create an for live.com Services.
- class LiveAuth
- # @private
- # @param j_del [::VertxAuthOauth2::LiveAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::LiveAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == LiveAuth
- end
- def @@j_api_type.wrap(obj)
- LiveAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::LiveAuth.java_class
- end
- # Create a OAuth2Auth provider for live.com
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by live.com
- # @param [String] clientSecret the client secret given to you by live.com
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(vertx=nil,clientId=nil,clientSecret=nil,httpClientOptions=nil)
- if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && !block_given? && httpClientOptions == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::LiveAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && httpClientOptions.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::LiveAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{httpClientOptions})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/mailchimp_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/mailchimp_auth.rb
deleted file mode 100644
index 8f869b87f..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/mailchimp_auth.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.MailchimpAuth
-module VertxAuthOauth2
- # Simplified factory to create an for Mailchimp.
- class MailchimpAuth
- # @private
- # @param j_del [::VertxAuthOauth2::MailchimpAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::MailchimpAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == MailchimpAuth
- end
- def @@j_api_type.wrap(obj)
- MailchimpAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::MailchimpAuth.java_class
- end
- # Create a OAuth2Auth provider for Dropbox
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by Mailchimp
- # @param [String] clientSecret the client secret given to you by Mailchimp
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(vertx=nil,clientId=nil,clientSecret=nil,httpClientOptions=nil)
- if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && !block_given? && httpClientOptions == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::MailchimpAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && httpClientOptions.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::MailchimpAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{httpClientOptions})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/o_auth2_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/o_auth2_auth.rb
deleted file mode 100644
index fda493f9c..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/o_auth2_auth.rb
+++ /dev/null
@@ -1,155 +0,0 @@
-require 'vertx-auth-common/user'
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/access_token'
-require 'vertx-auth-common/auth_provider'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.OAuth2Auth
-module VertxAuthOauth2
- # Factory interface for creating OAuth2 based {::VertxAuthCommon::AuthProvider} instances.
- class OAuth2Auth < ::VertxAuthCommon::AuthProvider
- # @private
- # @param j_del [::VertxAuthOauth2::OAuth2Auth] the java delegate
- def initialize(j_del)
- super(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::OAuth2Auth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == OAuth2Auth
- end
- def @@j_api_type.wrap(obj)
- OAuth2Auth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2::OAuth2Auth.java_class
- end
- # @param [Hash{String => Object}] arg0
- # @yield
- # @return [void]
- def authenticate(arg0=nil)
- if arg0.class == Hash && block_given?
- return @j_del.java_method(:authenticate, [Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(::Vertx::Util::Utils.to_json_object(arg0),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxAuthCommon::User) : nil) }))
- end
- raise ArgumentError, "Invalid arguments when calling authenticate(#{arg0})"
- end
- # @param [::Vertx::Vertx] vertx the Vertx instance
- # @param [:AUTH_CODE,:CLIENT,:PASSWORD,:AUTH_JWT] flow
- # @param [Hash{String => Object}] config the config as exported from the admin console
- # @return [::VertxAuthOauth2::OAuth2Auth] the auth provider
- def self.create_keycloak(vertx=nil,flow=nil,config=nil)
- if vertx.class.method_defined?(:j_del) && flow.class == Symbol && config.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2::OAuth2Auth.java_method(:createKeycloak, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtAuthOauth2::OAuth2FlowType.java_class,Java::IoVertxCoreJson::JsonObject.java_class]).call(vertx.j_del,Java::IoVertxExtAuthOauth2::OAuth2FlowType.valueOf(flow.to_s),::Vertx::Util::Utils.to_json_object(config)),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create_keycloak(#{vertx},#{flow},#{config})"
- end
- # Create a OAuth2 auth provider
- # @param [::Vertx::Vertx] vertx the Vertx instance
- # @param [:AUTH_CODE,:CLIENT,:PASSWORD,:AUTH_JWT] flow
- # @param [Hash] config the config
- # @return [::VertxAuthOauth2::OAuth2Auth] the auth provider
- def self.create(vertx=nil,flow=nil,config=nil)
- if vertx.class.method_defined?(:j_del) && flow.class == Symbol && !block_given? && config == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2::OAuth2Auth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtAuthOauth2::OAuth2FlowType.java_class]).call(vertx.j_del,Java::IoVertxExtAuthOauth2::OAuth2FlowType.valueOf(flow.to_s)),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && flow.class == Symbol && config.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2::OAuth2Auth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtAuthOauth2::OAuth2FlowType.java_class,Java::IoVertxExtAuthOauth2::OAuth2ClientOptions.java_class]).call(vertx.j_del,Java::IoVertxExtAuthOauth2::OAuth2FlowType.valueOf(flow.to_s),Java::IoVertxExtAuthOauth2::OAuth2ClientOptions.new(::Vertx::Util::Utils.to_json_object(config))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{flow},#{config})"
- end
- # Generate a redirect URL to the authN/Z backend. It only applies to auth_code flow.
- # @param [Hash{String => Object}] params
- # @return [String]
- def authorize_url(params=nil)
- if params.class == Hash && !block_given?
- return @j_del.java_method(:authorizeURL, [Java::IoVertxCoreJson::JsonObject.java_class]).call(::Vertx::Util::Utils.to_json_object(params))
- end
- raise ArgumentError, "Invalid arguments when calling authorize_url(#{params})"
- end
- # Returns the Access Token object.
- # @param [Hash{String => Object}] params - JSON with the options, each flow requires different options.
- # @yield - The handler returning the results.
- # @return [void]
- def get_token(params=nil)
- if params.class == Hash && block_given?
- return @j_del.java_method(:getToken, [Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(::Vertx::Util::Utils.to_json_object(params),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxAuthOauth2::AccessToken) : nil) }))
- end
- raise ArgumentError, "Invalid arguments when calling get_token(#{params})"
- end
- # Call OAuth2 APIs.
- # @param [:OPTIONS,:GET,:HEAD,:POST,:PUT,:DELETE,:TRACE,:CONNECT,:PATCH,:OTHER] method HttpMethod
- # @param [String] path target path
- # @param [Hash{String => Object}] params parameters
- # @yield handler
- # @return [self]
- def api(method=nil,path=nil,params=nil)
- if method.class == Symbol && path.class == String && params.class == Hash && block_given?
- @j_del.java_method(:api, [Java::IoVertxCoreHttp::HttpMethod.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxCoreHttp::HttpMethod.valueOf(method.to_s),path,::Vertx::Util::Utils.to_json_object(params),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) }))
- return self
- end
- raise ArgumentError, "Invalid arguments when calling api(#{method},#{path},#{params})"
- end
- # Returns true if this provider supports JWT tokens as the access_token. This is typically true if the provider
- # implements the `openid-connect` protocol. This is a plain return from the config option jwtToken, which is false
- # by default.
- #
- # This information is important to validate grants. Since pure OAuth2 should be used for authorization and when a
- # token is requested all grants should be declared, in case of openid-connect this is not true. OpenId will issue
- # a token and all grants will be encoded on the token itself so the requester does not need to list the required
- # grants.
- # @return [true,false] true if openid-connect is used.
- def has_jwt_token?
- if !block_given?
- return @j_del.java_method(:hasJWTToken, []).call()
- end
- raise ArgumentError, "Invalid arguments when calling has_jwt_token?()"
- end
- # Decode a token to a {::VertxAuthOauth2::AccessToken} object. This is useful to handle bearer JWT tokens.
- # @param [String] token the access token (base64 string)
- # @yield A handler to receive the event
- # @return [self]
- def decode_token(token=nil)
- if token.class == String && block_given?
- @j_del.java_method(:decodeToken, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(token,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxAuthOauth2::AccessToken) : nil) }))
- return self
- end
- raise ArgumentError, "Invalid arguments when calling decode_token(#{token})"
- end
- # 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 [String] token the access token (base64 string)
- # @param [String] tokenType hint to the token type e.g.: `access_token`
- # @yield A handler to receive the event
- # @return [self]
- def introspect_token(token=nil,tokenType=nil)
- if token.class == String && block_given? && tokenType == nil
- @j_del.java_method(:introspectToken, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(token,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxAuthOauth2::AccessToken) : nil) }))
- return self
- elsif token.class == String && tokenType.class == String && block_given?
- @j_del.java_method(:introspectToken, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(token,tokenType,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) }))
- return self
- end
- raise ArgumentError, "Invalid arguments when calling introspect_token(#{token},#{tokenType})"
- end
- # Returns the scope separator.
- #
- # The RFC 6749 states that a scope is expressed as a set of case-sensitive and space-delimited strings, however
- # vendors tend not to agree on this and we see the following cases being used: space, plus sign, comma.
- # @return [String] what value was used in the configuration of the object, falling back to the default value which is a space.
- def get_scope_separator
- if !block_given?
- return @j_del.java_method(:getScopeSeparator, []).call()
- end
- raise ArgumentError, "Invalid arguments when calling get_scope_separator()"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/salesforce_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/salesforce_auth.rb
deleted file mode 100644
index 71064d92c..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/salesforce_auth.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.SalesforceAuth
-module VertxAuthOauth2
- # Simplified factory to create an for Salesforce.
- class SalesforceAuth
- # @private
- # @param j_del [::VertxAuthOauth2::SalesforceAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::SalesforceAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == SalesforceAuth
- end
- def @@j_api_type.wrap(obj)
- SalesforceAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::SalesforceAuth.java_class
- end
- # Create a OAuth2Auth provider for Salesforce
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by Salesforce
- # @param [String] clientSecret the client secret given to you by Salesforce
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(vertx=nil,clientId=nil,clientSecret=nil,httpClientOptions=nil)
- if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && !block_given? && httpClientOptions == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::SalesforceAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && httpClientOptions.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::SalesforceAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{httpClientOptions})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/shopify_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/shopify_auth.rb
deleted file mode 100644
index b73d11fdc..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/shopify_auth.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.ShopifyAuth
-module VertxAuthOauth2
- # Simplified factory to create an for Shopify.
- class ShopifyAuth
- # @private
- # @param j_del [::VertxAuthOauth2::ShopifyAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::ShopifyAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == ShopifyAuth
- end
- def @@j_api_type.wrap(obj)
- ShopifyAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::ShopifyAuth.java_class
- end
- # Create a OAuth2Auth provider for Shopify
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by Shopify
- # @param [String] clientSecret the client secret given to you by Shopify
- # @param [String] shop your shop name
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(vertx=nil,clientId=nil,clientSecret=nil,shop=nil,httpClientOptions=nil)
- if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && shop.class == String && !block_given? && httpClientOptions == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::ShopifyAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret,shop),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && shop.class == String && httpClientOptions.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::ShopifyAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,shop,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{shop},#{httpClientOptions})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/soundcloud_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/soundcloud_auth.rb
deleted file mode 100644
index 553786260..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/soundcloud_auth.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.SoundcloudAuth
-module VertxAuthOauth2
- # Simplified factory to create an for SoundCloud.
- class SoundcloudAuth
- # @private
- # @param j_del [::VertxAuthOauth2::SoundcloudAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::SoundcloudAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == SoundcloudAuth
- end
- def @@j_api_type.wrap(obj)
- SoundcloudAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::SoundcloudAuth.java_class
- end
- # Create a OAuth2Auth provider for Dropbox
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by SoundCloud
- # @param [String] clientSecret the client secret given to you by SoundCloud
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(vertx=nil,clientId=nil,clientSecret=nil,httpClientOptions=nil)
- if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && !block_given? && httpClientOptions == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::SoundcloudAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && httpClientOptions.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::SoundcloudAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{httpClientOptions})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/stripe_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/stripe_auth.rb
deleted file mode 100644
index 7e521fbee..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/stripe_auth.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.StripeAuth
-module VertxAuthOauth2
- # Simplified factory to create an for Stripe.
- class StripeAuth
- # @private
- # @param j_del [::VertxAuthOauth2::StripeAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::StripeAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == StripeAuth
- end
- def @@j_api_type.wrap(obj)
- StripeAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::StripeAuth.java_class
- end
- # Create a OAuth2Auth provider for Dropbox
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by Stripe
- # @param [String] clientSecret the client secret given to you by Stripe
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(vertx=nil,clientId=nil,clientSecret=nil,httpClientOptions=nil)
- if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && !block_given? && httpClientOptions == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::StripeAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && httpClientOptions.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::StripeAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{httpClientOptions})"
- end
- end
-end
diff --git a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/twitter_auth.rb b/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/twitter_auth.rb
deleted file mode 100644
index afb8796a7..000000000
--- a/vertx-auth-oauth2/src/main/resources/vertx-auth-oauth2/twitter_auth.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-require 'vertx/vertx'
-require 'vertx-auth-oauth2/o_auth2_auth'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.oauth2.providers.TwitterAuth
-module VertxAuthOauth2
- # Simplified factory to create an for Twitter.
- class TwitterAuth
- # @private
- # @param j_del [::VertxAuthOauth2::TwitterAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthOauth2::TwitterAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == TwitterAuth
- end
- def @@j_api_type.wrap(obj)
- TwitterAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthOauth2Providers::TwitterAuth.java_class
- end
- # Create a OAuth2Auth provider for Twitter
- # @param [::Vertx::Vertx] vertx
- # @param [String] clientId the client id given to you by Twitter
- # @param [String] clientSecret the client secret given to you by Twitter
- # @param [Hash] httpClientOptions custom http client options
- # @return [::VertxAuthOauth2::OAuth2Auth]
- def self.create(vertx=nil,clientId=nil,clientSecret=nil,httpClientOptions=nil)
- if vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && !block_given? && httpClientOptions == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::TwitterAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,clientId,clientSecret),::VertxAuthOauth2::OAuth2Auth)
- elsif vertx.class.method_defined?(:j_del) && clientId.class == String && clientSecret.class == String && httpClientOptions.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthOauth2Providers::TwitterAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreHttp::HttpClientOptions.java_class]).call(vertx.j_del,clientId,clientSecret,Java::IoVertxCoreHttp::HttpClientOptions.new(::Vertx::Util::Utils.to_json_object(httpClientOptions))),::VertxAuthOauth2::OAuth2Auth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{clientId},#{clientSecret},#{httpClientOptions})"
- end
- end
-end
diff --git a/vertx-auth-shiro/src/main/asciidoc/groovy/index.adoc b/vertx-auth-shiro/src/main/asciidoc/groovy/index.adoc
index 87b5c9008..b58fbc946 100644
--- a/vertx-auth-shiro/src/main/asciidoc/groovy/index.adoc
+++ b/vertx-auth-shiro/src/main/asciidoc/groovy/index.adoc
@@ -12,7 +12,7 @@ project, add the following dependency to the _dependencies_ section of your buil
io.vertx
vertx-auth-shiro
- 3.4.0.Beta1
+ 3.4.0-SNAPSHOT
----
@@ -20,7 +20,7 @@ project, add the following dependency to the _dependencies_ section of your buil
[source,groovy,subs="+attributes"]
----
-compile 'io.vertx:vertx-auth-shiro:3.4.0.Beta1'
+compile 'io.vertx:vertx-auth-shiro:3.4.0-SNAPSHOT'
----
We provide out of the box support for properties and LDAP based auth using Shiro, and you can also plugin in any
@@ -34,8 +34,6 @@ Here's an example of creating a Shiro auth provider by specifying the type:
[source,java]
----
-import io.vertx.ext.auth.shiro.ShiroAuthRealmType
-import io.vertx.ext.auth.shiro.ShiroAuth
def config = [
properties_path:"classpath:test-auth.properties"
@@ -180,7 +178,6 @@ This is done as follows:
[source,java]
----
-import io.vertx.ext.auth.shiro.ShiroAuth
def provider = ShiroAuth.create(vertx, realm)
diff --git a/vertx-auth-shiro/src/main/asciidoc/java/index.adoc b/vertx-auth-shiro/src/main/asciidoc/java/index.adoc
index 6715afe70..328708dfb 100644
--- a/vertx-auth-shiro/src/main/asciidoc/java/index.adoc
+++ b/vertx-auth-shiro/src/main/asciidoc/java/index.adoc
@@ -12,7 +12,7 @@ project, add the following dependency to the _dependencies_ section of your buil
io.vertx
vertx-auth-shiro
- 3.4.0.Beta1
+ 3.4.0-SNAPSHOT
----
@@ -20,7 +20,7 @@ project, add the following dependency to the _dependencies_ section of your buil
[source,groovy,subs="+attributes"]
----
-compile 'io.vertx:vertx-auth-shiro:3.4.0.Beta1'
+compile 'io.vertx:vertx-auth-shiro:3.4.0-SNAPSHOT'
----
We provide out of the box support for properties and LDAP based auth using Shiro, and you can also plugin in any
diff --git a/vertx-auth-shiro/src/main/asciidoc/js/index.adoc b/vertx-auth-shiro/src/main/asciidoc/js/index.adoc
index 4f9c9f437..a6ba0acc8 100644
--- a/vertx-auth-shiro/src/main/asciidoc/js/index.adoc
+++ b/vertx-auth-shiro/src/main/asciidoc/js/index.adoc
@@ -12,7 +12,7 @@ project, add the following dependency to the _dependencies_ section of your buil
io.vertx
vertx-auth-shiro
- 3.4.0.Beta1
+ 3.4.0-SNAPSHOT
----
@@ -20,7 +20,7 @@ project, add the following dependency to the _dependencies_ section of your buil
[source,groovy,subs="+attributes"]
----
-compile 'io.vertx:vertx-auth-shiro:3.4.0.Beta1'
+compile 'io.vertx:vertx-auth-shiro:3.4.0-SNAPSHOT'
----
We provide out of the box support for properties and LDAP based auth using Shiro, and you can also plugin in any
diff --git a/vertx-auth-shiro/src/main/asciidoc/kotlin/index.adoc b/vertx-auth-shiro/src/main/asciidoc/kotlin/index.adoc
new file mode 100644
index 000000000..99f8a3a7f
--- /dev/null
+++ b/vertx-auth-shiro/src/main/asciidoc/kotlin/index.adoc
@@ -0,0 +1,190 @@
+== The Apache Shiro Auth provider implementation
+
+This is an auth provider implementation that uses http://shiro.apache.org/[Apache Shiro].
+
+To use this
+project, add the following dependency to the _dependencies_ section of your build descriptor:
+
+* Maven (in your `pom.xml`):
+
+[source,xml,subs="+attributes"]
+----
+
+ io.vertx
+ vertx-auth-shiro
+ 3.4.0-SNAPSHOT
+
+----
+
+* Gradle (in your `build.gradle` file):
+
+[source,groovy,subs="+attributes"]
+----
+compile 'io.vertx:vertx-auth-shiro:3.4.0-SNAPSHOT'
+----
+
+We provide out of the box support for properties and LDAP based auth using Shiro, and you can also plugin in any
+other Shiro Realm which expects username and password for credentials.
+
+To create an instance of the provider you use `link:../../apidocs/io/vertx/ext/auth/shiro/ShiroAuth.html[ShiroAuth]`. You specify the type of
+Shiro auth provider that you want with `link:../../apidocs/io/vertx/ext/auth/shiro/ShiroAuthRealmType.html[ShiroAuthRealmType]`, and you specify the
+configuration in a JSON object.
+
+Here's an example of creating a Shiro auth provider by specifying the type:
+
+[source,java]
+----
+
+var config = json {
+ obj("properties_path" to "classpath:test-auth.properties")
+}
+
+var provider = ShiroAuth.create(vertx, ShiroAuthRealmType.PROPERTIES, config)
+
+
+----
+
+== Authentication
+
+When authenticating using this implementation, it assumes `username` and `password` fields are present in the
+authentication info:
+
+[source,java]
+----
+
+var authInfo = json {
+ obj(
+ "username" to "tim",
+ "password" to "sausages"
+ )
+}
+
+authProvider.authenticate(authInfo, { res ->
+ if (res.succeeded()) {
+ var user = res.result()
+ } else {
+ // Failed!
+ }
+})
+
+----
+
+== Authorisation - Permission-Role Model
+
+Although Vert.x auth itself does not mandate any specific model of permissions (they are just opaque strings), this
+implementation uses a familiar user/role/permission model, where a user can have zero or more roles and a role
+can have zero or more permissions.
+
+If validating if a user has a particular permission simply pass the permission into.
+`link:../../apidocs/io/vertx/ext/auth/User.html#isAuthorised-java.lang.String-io.vertx.core.Handler-[isAuthorised]` as follows:
+
+[source,java]
+----
+
+user.isAuthorised("newsletter:edit:13", { res ->
+ if (res.succeeded()) {
+ var hasPermission = res.result()
+ } else {
+ // Failed to
+ }
+})
+
+
+----
+If validating that a user has a particular _role_ then you should prefix the argument with the role prefix.
+
+[source,java]
+----
+
+user.isAuthorised("role:manager", { res ->
+ if (res.succeeded()) {
+ var hasRole = res.result()
+ } else {
+ // Failed to
+ }
+})
+
+
+----
+
+The default role prefix is `role:`. You can change this with `link:../../apidocs/io/vertx/ext/auth/shiro/ShiroAuth.html#setRolePrefix-java.lang.String-[setRolePrefix]`.
+
+=== The Shiro properties auth provider
+
+This auth provider implementation uses Apache Shiro to get user/role/permission information from a properties file.
+
+Note that roles are not available directly on the API due to the fact that vertx-auth tries to be as portable as
+possible. However one can run assertions on role by using the prefix `role:` or by specifying the prefered prefix
+with `link:../../apidocs/io/vertx/ext/auth/shiro/ShiroAuth.html#setRolePrefix-java.lang.String-[setRolePrefix]`.
+
+The implementation will, by default, look for a file called `vertx-users.properties` on the classpath.
+
+If you want to change this, you can use the `properties_path` configuration element to define how the properties
+file is found.
+
+The default value is `classpath:vertx-users.properties`.
+
+If the value is prefixed with `classpath:` then the classpath will be searched for a properties file of that name.
+
+If the value is prefixed with `file:` then it specifies a file on the file system.
+
+If the value is prefixed with `url:` then it specifies a URL from where to load the properties.
+
+The properties file should have the following structure:
+
+Each line should either contain the username, password and roles for a user or the permissions in a role.
+
+For a user line it should be of the form:
+
+ user.{username}={password},{roleName1},{roleName2},...,{roleNameN}
+
+For a role line it should be of the form:
+
+ role.{roleName}={permissionName1},{permissionName2},...,{permissionNameN}
+
+Here's an example:
+----
+user.tim = mypassword,administrator,developer
+user.bob = hispassword,developer
+user.joe = anotherpassword,manager
+role.administrator=*
+role.manager=play_golf,say_buzzwords
+role.developer=do_actual_work
+----
+
+When describing roles a wildcard `*` can be used to indicate that the role has all permissions.
+
+=== The Shiro LDAP auth provider
+
+The LDAP auth realm gets user/role/permission information from an LDAP server.
+
+The following configuration properties are used to configure the LDAP realm:
+
+`ldap-user-dn-template`:: this is used to determine the actual lookup to use when looking up a user with a particular
+id. An example is `uid={0},ou=users,dc=foo,dc=com` - the element `{0}` is substituted with the user id to create the
+actual lookup. This setting is mandatory.
+`ldap_url`:: the url to the LDAP server. The url must start with `ldap://` and a port must be specified.
+An example is `ldap://myldapserver.mycompany.com:10389`
+`ldap-authentication-mechanism`:: TODO
+`ldap-context-factory-class-name`:: TODO
+`ldap-pooling-enabled`:: TODO
+`ldap-referral`:: TODO
+`ldap-system-username`:: TODO
+`ldap-system-password`:: TODO
+
+=== Using another Shiro Realm
+
+It's also possible to create an auth provider instance using a pre-created Apache Shiro Realm object.
+
+This is done as follows:
+
+[source,java]
+----
+
+var provider = ShiroAuth.create(vertx, realm)
+
+
+----
+
+The implementation currently assumes that user/password based authentication is used.
+Julien VietTim Fox
\ No newline at end of file
diff --git a/vertx-auth-shiro/src/main/asciidoc/ruby/index.adoc b/vertx-auth-shiro/src/main/asciidoc/ruby/index.adoc
index 2db9d1289..674b81a73 100644
--- a/vertx-auth-shiro/src/main/asciidoc/ruby/index.adoc
+++ b/vertx-auth-shiro/src/main/asciidoc/ruby/index.adoc
@@ -12,7 +12,7 @@ project, add the following dependency to the _dependencies_ section of your buil
io.vertx
vertx-auth-shiro
- 3.4.0.Beta1
+ 3.4.0-SNAPSHOT
----
@@ -20,7 +20,7 @@ project, add the following dependency to the _dependencies_ section of your buil
[source,groovy,subs="+attributes"]
----
-compile 'io.vertx:vertx-auth-shiro:3.4.0.Beta1'
+compile 'io.vertx:vertx-auth-shiro:3.4.0-SNAPSHOT'
----
We provide out of the box support for properties and LDAP based auth using Shiro, and you can also plugin in any
diff --git a/vertx-auth-shiro/src/main/resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule b/vertx-auth-shiro/src/main/resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
deleted file mode 100644
index 69e2c3c10..000000000
--- a/vertx-auth-shiro/src/main/resources/META-INF/services/org.codehaus.groovy.runtime.ExtensionModule
+++ /dev/null
@@ -1,4 +0,0 @@
-moduleName = io.vertx.ext.auth.shiro.ShiroAuth-module
-moduleVersion = 1.0
-extensionClasses =
-staticExtensionClasses = io.vertx.groovy.ext.auth.shiro.ShiroAuth_GroovyStaticExtension
diff --git a/vertx-auth-shiro/src/main/resources/vertx-auth-common-js/shiro_auth.js b/vertx-auth-shiro/src/main/resources/vertx-auth-common-js/shiro_auth.js
deleted file mode 100644
index e3f20d9ef..000000000
--- a/vertx-auth-shiro/src/main/resources/vertx-auth-common-js/shiro_auth.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-common-js/shiro_auth */
-var utils = require('vertx-js/util/utils');
-var AuthProvider = require('vertx-auth-common-js/auth_provider');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JShiroAuth = io.vertx.ext.auth.shiro.ShiroAuth;
-
-/**
-
- @class
-*/
-var ShiroAuth = function(j_val) {
-
- var j_shiroAuth = j_val;
- var that = this;
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_shiroAuth;
-};
-
-/**
-
- @memberof module:vertx-auth-common-js/shiro_auth
- @param vertx {Vertx}
- @param realmType {Object}
- @param config {Object}
- @return {AuthProvider}
- */
-ShiroAuth.create = function(vertx, realmType, config) {
- var __args = arguments;
- if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'object') {
- return new AuthProvider(JShiroAuth["create(io.vertx.core.Vertx,io.vertx.ext.auth.shiro.ShiroAuthRealmType,io.vertx.core.json.JsonObject)"](vertx._jdel, io.vertx.ext.auth.shiro.ShiroAuthRealmType.valueOf(__args[1]), utils.convParamJsonObject(config)));
- } else utils.invalidArgs();
-};
-
-// We export the Constructor function
-module.exports = ShiroAuth;
\ No newline at end of file
diff --git a/vertx-auth-shiro/src/main/resources/vertx-auth-common/shiro_auth.rb b/vertx-auth-shiro/src/main/resources/vertx-auth-common/shiro_auth.rb
deleted file mode 100644
index 0bb123a51..000000000
--- a/vertx-auth-shiro/src/main/resources/vertx-auth-common/shiro_auth.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-require 'vertx-auth-common/auth_provider'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.shiro.ShiroAuth
-module VertxAuthCommon
- # Factory interface for creating Apache Shiro based {::VertxAuthCommon::AuthProvider} instances.
- class ShiroAuth
- # @private
- # @param j_del [::VertxAuthCommon::ShiroAuth] the java delegate
- def initialize(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthCommon::ShiroAuth] the underlying java delegate
- def j_del
- @j_del
- end
- # @param [::Vertx::Vertx] vertx
- # @param [:PROPERTIES,:LDAP] realmType
- # @param [Hash{String => Object}] config
- # @return [::VertxAuthCommon::AuthProvider]
- def self.create(vertx=nil,realmType=nil,config=nil)
- if vertx.class.method_defined?(:j_del) && realmType.class == Symbol && config.class == Hash && !block_given?
- return ::VertxAuthCommon::AuthProvider.new(Java::IoVertxExtAuthShiro::ShiroAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtAuthShiro::ShiroAuthRealmType.java_class,Java::IoVertxCoreJson::JsonObject.java_class]).call(vertx.j_del,Java::IoVertxExtAuthShiro::ShiroAuthRealmType.valueOf(realmType),::Vertx::Util::Utils.to_json_object(config)))
- end
- raise ArgumentError, "Invalid arguments when calling create(vertx,realmType,config)"
- end
- end
-end
diff --git a/vertx-auth-shiro/src/main/resources/vertx-auth-shiro-js/shiro_auth.js b/vertx-auth-shiro/src/main/resources/vertx-auth-shiro-js/shiro_auth.js
deleted file mode 100644
index 6b7b8b678..000000000
--- a/vertx-auth-shiro/src/main/resources/vertx-auth-shiro-js/shiro_auth.js
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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.
- */
-
-/** @module vertx-auth-shiro-js/shiro_auth */
-var utils = require('vertx-js/util/utils');
-var User = require('vertx-auth-common-js/user');
-var Vertx = require('vertx-js/vertx');
-var AuthProvider = require('vertx-auth-common-js/auth_provider');
-
-var io = Packages.io;
-var JsonObject = io.vertx.core.json.JsonObject;
-var JShiroAuth = Java.type('io.vertx.ext.auth.shiro.ShiroAuth');
-var ShiroAuthOptions = Java.type('io.vertx.ext.auth.shiro.ShiroAuthOptions');
-
-/**
-
- @class
-*/
-var ShiroAuth = function(j_val) {
-
- var j_shiroAuth = j_val;
- var that = this;
- AuthProvider.call(this, j_val);
-
- /**
-
- @public
- @param arg0 {Object}
- @param arg1 {function}
- */
- this.authenticate = function(arg0, arg1) {
- var __args = arguments;
- if (__args.length === 2 && (typeof __args[0] === 'object' && __args[0] != null) && typeof __args[1] === 'function') {
- j_shiroAuth["authenticate(io.vertx.core.json.JsonObject,io.vertx.core.Handler)"](utils.convParamJsonObject(arg0), function(ar) {
- if (ar.succeeded()) {
- arg1(utils.convReturnVertxGen(User, ar.result()), null);
- } else {
- arg1(null, ar.cause());
- }
- });
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- /**
- Set the role prefix to distinguish from permissions when checking for isPermitted requests.
-
- @public
- @param rolePrefix {string} a Prefix e.g.: "role:"
- @return {ShiroAuth} a reference to this for fluency
- */
- this.setRolePrefix = function(rolePrefix) {
- var __args = arguments;
- if (__args.length === 1 && typeof __args[0] === 'string') {
- return utils.convReturnVertxGen(ShiroAuth, j_shiroAuth["setRolePrefix(java.lang.String)"](rolePrefix));
- } else throw new TypeError('function invoked with invalid arguments');
- };
-
- // A reference to the underlying Java delegate
- // NOTE! This is an internal API and must not be used in user code.
- // If you rely on this property your code is likely to break if we change it / remove it without warning.
- this._jdel = j_shiroAuth;
-};
-
-ShiroAuth._jclass = utils.getJavaClass("io.vertx.ext.auth.shiro.ShiroAuth");
-ShiroAuth._jtype = {
- accept: function(obj) {
- return ShiroAuth._jclass.isInstance(obj._jdel);
- },
- wrap: function(jdel) {
- var obj = Object.create(ShiroAuth.prototype, {});
- ShiroAuth.apply(obj, arguments);
- return obj;
- },
- unwrap: function(obj) {
- return obj._jdel;
- }
-};
-ShiroAuth._create = function(jdel) {
- var obj = Object.create(ShiroAuth.prototype, {});
- ShiroAuth.apply(obj, arguments);
- return obj;
-}
-/**
- Create a Shiro auth provider
-
- @memberof module:vertx-auth-shiro-js/shiro_auth
- @param vertx {Vertx} the Vert.x instance
- @param realmType {Object} the Shiro realm type
- @param config {Object} the config
- @return {ShiroAuth} the auth provider
- */
-ShiroAuth.create = function() {
- var __args = arguments;
- if (__args.length === 2 && typeof __args[0] === 'object' && __args[0]._jdel && (typeof __args[1] === 'object' && __args[1] != null)) {
- return utils.convReturnVertxGen(ShiroAuth, JShiroAuth["create(io.vertx.core.Vertx,io.vertx.ext.auth.shiro.ShiroAuthOptions)"](__args[0]._jdel, __args[1] != null ? new ShiroAuthOptions(new JsonObject(Java.asJSONCompatible(__args[1]))) : null));
- }else if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && (typeof __args[2] === 'object' && __args[2] != null)) {
- return utils.convReturnVertxGen(ShiroAuth, JShiroAuth["create(io.vertx.core.Vertx,io.vertx.ext.auth.shiro.ShiroAuthRealmType,io.vertx.core.json.JsonObject)"](__args[0]._jdel, io.vertx.ext.auth.shiro.ShiroAuthRealmType.valueOf(__args[1]), utils.convParamJsonObject(__args[2])));
- } else throw new TypeError('function invoked with invalid arguments');
-};
-
-module.exports = ShiroAuth;
\ No newline at end of file
diff --git a/vertx-auth-shiro/src/main/resources/vertx-auth-shiro/shiro_auth.rb b/vertx-auth-shiro/src/main/resources/vertx-auth-shiro/shiro_auth.rb
deleted file mode 100644
index 08a8558d9..000000000
--- a/vertx-auth-shiro/src/main/resources/vertx-auth-shiro/shiro_auth.rb
+++ /dev/null
@@ -1,72 +0,0 @@
-require 'vertx-auth-common/user'
-require 'vertx/vertx'
-require 'vertx-auth-common/auth_provider'
-require 'vertx/util/utils.rb'
-# Generated from io.vertx.ext.auth.shiro.ShiroAuth
-module VertxAuthShiro
- # Factory interface for creating Apache Shiro based {::VertxAuthCommon::AuthProvider} instances.
- class ShiroAuth < ::VertxAuthCommon::AuthProvider
- # @private
- # @param j_del [::VertxAuthShiro::ShiroAuth] the java delegate
- def initialize(j_del)
- super(j_del)
- @j_del = j_del
- end
- # @private
- # @return [::VertxAuthShiro::ShiroAuth] the underlying java delegate
- def j_del
- @j_del
- end
- @@j_api_type = Object.new
- def @@j_api_type.accept?(obj)
- obj.class == ShiroAuth
- end
- def @@j_api_type.wrap(obj)
- ShiroAuth.new(obj)
- end
- def @@j_api_type.unwrap(obj)
- obj.j_del
- end
- def self.j_api_type
- @@j_api_type
- end
- def self.j_class
- Java::IoVertxExtAuthShiro::ShiroAuth.java_class
- end
- # @param [Hash{String => Object}] arg0
- # @yield
- # @return [void]
- def authenticate(arg0=nil)
- if arg0.class == Hash && block_given?
- return @j_del.java_method(:authenticate, [Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(::Vertx::Util::Utils.to_json_object(arg0),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxAuthCommon::User) : nil) }))
- end
- raise ArgumentError, "Invalid arguments when calling authenticate(#{arg0})"
- end
- # Create a Shiro auth provider
- # @overload create(vertx,options)
- # @param [::Vertx::Vertx] vertx the Vert.x instance
- # @param [Hash] options the Shiro configuration options
- # @overload create(vertx,realmType,config)
- # @param [::Vertx::Vertx] vertx the Vert.x instance
- # @param [:PROPERTIES,:LDAP] realmType the Shiro realm type
- # @param [Hash{String => Object}] config the config
- # @return [::VertxAuthShiro::ShiroAuth] the auth provider
- def self.create(param_1=nil,param_2=nil,param_3=nil)
- if param_1.class.method_defined?(:j_del) && param_2.class == Hash && !block_given? && param_3 == nil
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthShiro::ShiroAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtAuthShiro::ShiroAuthOptions.java_class]).call(param_1.j_del,Java::IoVertxExtAuthShiro::ShiroAuthOptions.new(::Vertx::Util::Utils.to_json_object(param_2))),::VertxAuthShiro::ShiroAuth)
- elsif param_1.class.method_defined?(:j_del) && param_2.class == Symbol && param_3.class == Hash && !block_given?
- return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthShiro::ShiroAuth.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtAuthShiro::ShiroAuthRealmType.java_class,Java::IoVertxCoreJson::JsonObject.java_class]).call(param_1.j_del,Java::IoVertxExtAuthShiro::ShiroAuthRealmType.valueOf(param_2.to_s),::Vertx::Util::Utils.to_json_object(param_3)),::VertxAuthShiro::ShiroAuth)
- end
- raise ArgumentError, "Invalid arguments when calling create(#{param_1},#{param_2},#{param_3})"
- end
- # Set the role prefix to distinguish from permissions when checking for isPermitted requests.
- # @param [String] rolePrefix a Prefix e.g.: "role:"
- # @return [::VertxAuthShiro::ShiroAuth] a reference to this for fluency
- def set_role_prefix(rolePrefix=nil)
- if rolePrefix.class == String && !block_given?
- return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:setRolePrefix, [Java::java.lang.String.java_class]).call(rolePrefix),::VertxAuthShiro::ShiroAuth)
- end
- raise ArgumentError, "Invalid arguments when calling set_role_prefix(#{rolePrefix})"
- end
- end
-end