Class List Method List File List

# Class: VertxAuthJdbc::JDBCAuth

Inherits:
  VertxAuthCommon::AuthProvider
  - Object
  - VertxAuthCommon::AuthProvider
  - VertxAuthJdbc::JDBCAuth
  show all
Defined in:
  /Users/julien/java/vertx-aggregator/modules/vertx-auth/vertx-auth-jdbc/src/main/resources/vertx-auth-jdbc/jdbc_auth.rb

## Overview

Factory interface for creating VertxAuthCommon::AuthProvider instances that use the Vert.x JDBC client

## Class Method Summary (collapse)

- + (::VertxAuthJdbc::JDBCAuth) create(client = nil)
  Create a JDBC auth provider implementation.

## Instance Method Summary (collapse)

- - (::VertxAuthJdbc::JDBCAuth) set_authentication_query(authenticationQuery = nil)
  Set the authentication query to use.
- - (::VertxAuthJdbc::JDBCAuth) set_permissions_query(permissionsQuery = nil)
  Set the permissions query to use.
- - (::VertxAuthJdbc::JDBCAuth) set_role_prefix(rolePrefix = nil)
  Set the role prefix to distinguish from permissions when checking for isPermitted requests.
- - (::VertxAuthJdbc::JDBCAuth) set_roles_query(rolesQuery = nil)
  Set the roles query to use.

## Class Method Details

### + (`::VertxAuthJdbc::JDBCAuth`) create(client = nil)

Create a JDBC auth provider implementation

Parameters:

- client (`::VertxJdbc::JDBCClient`) (defaults to: `nil`) —
  the JDBC client instance

Returns:

- (`::VertxAuthJdbc::JDBCAuth`) —
  the auth provider

Raises:

- (`ArgumentError`)

    22
    23
    24
    25
    26
    27
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-auth/vertx-auth-jdbc/src/main/resources/vertx-auth-jdbc/jdbc_auth.rb', line 22

    def self.create(client=nil)
      if client.class.method_defined?(:j_del) && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtAuthJdbc::JDBCAuth.java_method(:create, [Java::IoVertxExtJdbc::JDBCClient.java_class]).call(client.j_del),::VertxAuthJdbc::JDBCAuth)
      end
      raise ArgumentError, "Invalid arguments when calling create(client)"
    end

## Instance Method Details

### - (`::VertxAuthJdbc::JDBCAuth`) set_authentication_query(authenticationQuery = nil)

Set the authentication query to use. Use this if you want to override the default authentication query.

Parameters:

- authenticationQuery (`String`) (defaults to: `nil`) —
  the authentication query

Returns:

- (`::VertxAuthJdbc::JDBCAuth`) —
  a reference to this for fluency

Raises:

- (`ArgumentError`)

    31
    32
    33
    34
    35
    36
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-auth/vertx-auth-jdbc/src/main/resources/vertx-auth-jdbc/jdbc_auth.rb', line 31

    def set_authentication_query(authenticationQuery=nil)
      if authenticationQuery.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:setAuthenticationQuery, [Java::java.lang.String.java_class]).call(authenticationQuery),::VertxAuthJdbc::JDBCAuth)
      end
      raise ArgumentError, "Invalid arguments when calling set_authentication_query(authenticationQuery)"
    end

### - (`::VertxAuthJdbc::JDBCAuth`) set_permissions_query(permissionsQuery = nil)

Set the permissions query to use. Use this if you want to override the default permissions query.

Parameters:

- permissionsQuery (`String`) (defaults to: `nil`) —
  the permissions query

Returns:

- (`::VertxAuthJdbc::JDBCAuth`) —
  a reference to this for fluency

Raises:

- (`ArgumentError`)

    49
    50
    51
    52
    53
    54
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-auth/vertx-auth-jdbc/src/main/resources/vertx-auth-jdbc/jdbc_auth.rb', line 49

    def set_permissions_query(permissionsQuery=nil)
      if permissionsQuery.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:setPermissionsQuery, [Java::java.lang.String.java_class]).call(permissionsQuery),::VertxAuthJdbc::JDBCAuth)
      end
      raise ArgumentError, "Invalid arguments when calling set_permissions_query(permissionsQuery)"
    end

### - (`::VertxAuthJdbc::JDBCAuth`) set_role_prefix(rolePrefix = nil)

Set the role prefix to distinguish from permissions when checking for isPermitted requests.

Parameters:

- rolePrefix (`String`) (defaults to: `nil`) —
  a Prefix e.g.: "role:"

Returns:

- (`::VertxAuthJdbc::JDBCAuth`) —
  a reference to this for fluency

Raises:

- (`ArgumentError`)

    58
    59
    60
    61
    62
    63
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-auth/vertx-auth-jdbc/src/main/resources/vertx-auth-jdbc/jdbc_auth.rb', line 58

    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),::VertxAuthJdbc::JDBCAuth)
      end
      raise ArgumentError, "Invalid arguments when calling set_role_prefix(rolePrefix)"
    end

### - (`::VertxAuthJdbc::JDBCAuth`) set_roles_query(rolesQuery = nil)

Set the roles query to use. Use this if you want to override the default roles query.

Parameters:

- rolesQuery (`String`) (defaults to: `nil`) —
  the roles query

Returns:

- (`::VertxAuthJdbc::JDBCAuth`) —
  a reference to this for fluency

Raises:

- (`ArgumentError`)

    40
    41
    42
    43
    44
    45
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-auth/vertx-auth-jdbc/src/main/resources/vertx-auth-jdbc/jdbc_auth.rb', line 40

    def set_roles_query(rolesQuery=nil)
      if rolesQuery.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:setRolesQuery, [Java::java.lang.String.java_class]).call(rolesQuery),::VertxAuthJdbc::JDBCAuth)
      end
      raise ArgumentError, "Invalid arguments when calling set_roles_query(rolesQuery)"
    end