Class: VertxAuthMongo::MongoAuth

Inherits:
VertxAuthCommon::AuthProvider show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb

Overview

An extension of AuthProvider which is using as store

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from VertxAuthCommon::AuthProvider

#authenticate

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


23
24
25
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 23

def @@j_api_type.accept?(obj)
  obj.class == MongoAuth
end

+ (::VertxAuthMongo::MongoAuth) create(mongoClient, config)

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));
 

Parameters:

  • mongoClient (::VertxMongo::MongoClient)
    an instance of to be used for data storage and retrival
  • config (Hash{String => Object})
    the configuration object for the current instance. By this

Returns:



319
320
321
322
323
324
325
326
327
328
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 319

def self.create(*args)
  if args[0].class.method_defined?(:j_del) && args[1].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(args[0].j_del,::Vertx::Util::Utils.to_json_object(args[1])),::VertxAuthMongo::MongoAuth)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling create(#{args[0]},#{args[1]})"
  end
end

+ (Object) DEFAULT_COLLECTION_NAME

The default name of the collection to be used


397
398
399
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 397

def self.DEFAULT_COLLECTION_NAME
  Java::IoVertxExtAuthMongo::MongoAuth.DEFAULT_COLLECTION_NAME
end

+ (Object) DEFAULT_CREDENTIAL_PASSWORD_FIELD

The default name of the property for the password, like it is transported in credentials by method VertxAuthCommon::AuthProvider#authenticate


425
426
427
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 425

def self.DEFAULT_CREDENTIAL_PASSWORD_FIELD
  Java::IoVertxExtAuthMongo::MongoAuth.DEFAULT_CREDENTIAL_PASSWORD_FIELD
end

+ (Object) DEFAULT_CREDENTIAL_USERNAME_FIELD

The default name of the property for the username, like it is transported in credentials by method VertxAuthCommon::AuthProvider#authenticate


420
421
422
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 420

def self.DEFAULT_CREDENTIAL_USERNAME_FIELD
  Java::IoVertxExtAuthMongo::MongoAuth.DEFAULT_CREDENTIAL_USERNAME_FIELD
end

+ (Object) DEFAULT_PASSWORD_FIELD

The default name of the property for the password, like it is stored in mongodb


405
406
407
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 405

def self.DEFAULT_PASSWORD_FIELD
  Java::IoVertxExtAuthMongo::MongoAuth.DEFAULT_PASSWORD_FIELD
end

+ (Object) DEFAULT_PERMISSION_FIELD

The default name of the property for the permissions, like it is stored in mongodb. Permissions are expected to be saved as JsonArray


415
416
417
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 415

def self.DEFAULT_PERMISSION_FIELD
  Java::IoVertxExtAuthMongo::MongoAuth.DEFAULT_PERMISSION_FIELD
end

+ (Object) DEFAULT_ROLE_FIELD

The default name of the property for the roles, like it is stored in mongodb. Roles are expected to be saved as JsonArray


410
411
412
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 410

def self.DEFAULT_ROLE_FIELD
  Java::IoVertxExtAuthMongo::MongoAuth.DEFAULT_ROLE_FIELD
end

+ (Object) DEFAULT_SALT_FIELD

The default name of the property for the salt field


429
430
431
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 429

def self.DEFAULT_SALT_FIELD
  Java::IoVertxExtAuthMongo::MongoAuth.DEFAULT_SALT_FIELD
end

+ (Object) DEFAULT_USERNAME_FIELD

The default name of the property for the username, like it is stored in mongodb


401
402
403
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 401

def self.DEFAULT_USERNAME_FIELD
  Java::IoVertxExtAuthMongo::MongoAuth.DEFAULT_USERNAME_FIELD
end

+ (Object) j_api_type



32
33
34
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 32

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



35
36
37
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 35

def self.j_class
  Java::IoVertxExtAuthMongo::MongoAuth.java_class
end

+ (Object) PROPERTY_COLLECTION_NAME

The property name to be used to set the name of the collection inside the config


361
362
363
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 361

def self.PROPERTY_COLLECTION_NAME
  Java::IoVertxExtAuthMongo::MongoAuth.PROPERTY_COLLECTION_NAME
end

+ (Object) PROPERTY_CREDENTIAL_PASSWORD_FIELD

The property name to be used to set the name of the field, where the password for the credentials is stored inside


385
386
387
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 385

def self.PROPERTY_CREDENTIAL_PASSWORD_FIELD
  Java::IoVertxExtAuthMongo::MongoAuth.PROPERTY_CREDENTIAL_PASSWORD_FIELD
end

+ (Object) PROPERTY_CREDENTIAL_USERNAME_FIELD

The property name to be used to set the name of the field, where the username for the credentials is stored inside


381
382
383
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 381

def self.PROPERTY_CREDENTIAL_USERNAME_FIELD
  Java::IoVertxExtAuthMongo::MongoAuth.PROPERTY_CREDENTIAL_USERNAME_FIELD
end

+ (Object) PROPERTY_PASSWORD_FIELD

The property name to be used to set the name of the field, where the password is stored inside


377
378
379
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 377

def self.PROPERTY_PASSWORD_FIELD
  Java::IoVertxExtAuthMongo::MongoAuth.PROPERTY_PASSWORD_FIELD
end

+ (Object) PROPERTY_PERMISSION_FIELD

The property name to be used to set the name of the field, where the permissions are stored inside


373
374
375
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 373

def self.PROPERTY_PERMISSION_FIELD
  Java::IoVertxExtAuthMongo::MongoAuth.PROPERTY_PERMISSION_FIELD
end

+ (Object) PROPERTY_ROLE_FIELD

The property name to be used to set the name of the field, where the roles are stored inside


369
370
371
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 369

def self.PROPERTY_ROLE_FIELD
  Java::IoVertxExtAuthMongo::MongoAuth.PROPERTY_ROLE_FIELD
end

+ (Object) PROPERTY_SALT_FIELD

The property name to be used to set the name of the field, where the SALT is stored inside


389
390
391
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 389

def self.PROPERTY_SALT_FIELD
  Java::IoVertxExtAuthMongo::MongoAuth.PROPERTY_SALT_FIELD
end

+ (Object) PROPERTY_SALT_STYLE

The property name to be used to set the name of the field, where the salt style is stored inside


393
394
395
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 393

def self.PROPERTY_SALT_STYLE
  Java::IoVertxExtAuthMongo::MongoAuth.PROPERTY_SALT_STYLE
end

+ (Object) PROPERTY_USERNAME_FIELD

The property name to be used to set the name of the field, where the username is stored inside


365
366
367
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 365

def self.PROPERTY_USERNAME_FIELD
  Java::IoVertxExtAuthMongo::MongoAuth.PROPERTY_USERNAME_FIELD
end

+ (Object) ROLE_PREFIX

The prefix which is used by the method when checking for role access


433
434
435
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 433

def self.ROLE_PREFIX
  Java::IoVertxExtAuthMongo::MongoAuth.ROLE_PREFIX
end

+ (Object) unwrap(obj)



29
30
31
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 29

def @@j_api_type.unwrap(obj)
  obj.j_del
end

+ (Object) wrap(obj)



26
27
28
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 26

def @@j_api_type.wrap(obj)
  MongoAuth.new(obj)
end

Instance Method Details

- (String) getCollectionName

The name of the collection used to store User objects inside. Defaults to DEFAULT_COLLECTION_NAME

Returns:

  • (String)
    the collectionName


86
87
88
89
90
91
92
93
94
95
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 86

def get_collection_name
  if !block_given?
    return @j_del.java_method(:getCollectionName, []).call()
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_collection_name()"
  end
end

- (::VertxAuthMongo::HashStrategy) getHashStrategy

The HashStrategy which is used by the current instance

Returns:



188
189
190
191
192
193
194
195
196
197
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 188

def get_hash_strategy
  if !block_given?
    return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:getHashStrategy, []).call(),::VertxAuthMongo::HashStrategy)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_hash_strategy()"
  end
end

- (String) getPasswordCredentialField

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

Returns:

  • (String)
    the passwordCredentialField


231
232
233
234
235
236
237
238
239
240
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 231

def get_password_credential_field
  if !block_given?
    return @j_del.java_method(:getPasswordCredentialField, []).call()
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_password_credential_field()"
  end
end

- (String) getPasswordField

Get the name of the field to be used for the password Defaults to DEFAULT_PASSWORD_FIELD

Returns:

  • (String)
    the passwordField


175
176
177
178
179
180
181
182
183
184
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 175

def get_password_field
  if !block_given?
    return @j_del.java_method(:getPasswordField, []).call()
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_password_field()"
  end
end

- (String) getPermissionField

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

Returns:

  • (String)
    the permissionField


100
101
102
103
104
105
106
107
108
109
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 100

def get_permission_field
  if !block_given?
    return @j_del.java_method(:getPermissionField, []).call()
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_permission_field()"
  end
end

- (String) getRoleField

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

Returns:

  • (String)
    the roleField


57
58
59
60
61
62
63
64
65
66
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 57

def get_role_field
  if !block_given?
    return @j_del.java_method(:getRoleField, []).call()
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_role_field()"
  end
end

- (String) getSaltField

Get the name of the field to be used for the salt. Only used when HashStrategy#set_salt_style is set to

Returns:

  • (String)
    the saltField


259
260
261
262
263
264
265
266
267
268
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 259

def get_salt_field
  if !block_given?
    return @j_del.java_method(:getSaltField, []).call()
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_salt_field()"
  end
end

- (String) getUsernameCredentialField

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

Returns:

  • (String)
    the usernameCredentialField


245
246
247
248
249
250
251
252
253
254
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 245

def get_username_credential_field
  if !block_given?
    return @j_del.java_method(:getUsernameCredentialField, []).call()
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_username_credential_field()"
  end
end

- (String) getUsernameField

Get the name of the field to be used for the username. Defaults to DEFAULT_USERNAME_FIELD

Returns:

  • (String)
    the usernameField


201
202
203
204
205
206
207
208
209
210
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 201

def get_username_field
  if !block_given?
    return @j_del.java_method(:getUsernameField, []).call()
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_username_field()"
  end
end

- (void) insertUser(username, password, roles, permissions, resultHandler) { ... }

This method returns an undefined value.

Insert a new user into mongo in the convenient way

Parameters:

  • username (String)
    the username to be set
  • password (String)
    the passsword in clear text, will be adapted following the definitions of the defined HashStrategy
  • roles (Array<String>)
    a list of roles to be set
  • permissions (Array<String>)
    a list of permissions to be set

Yields:

  • the ResultHandler will be provided with the id of the generated record


277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 277

def insert_user(*args)
  if args[0].class == String && args[1].class == String && args[2].class == Array && args[3].class == Array && true
    if (block_given?)
      return @j_del.java_method(:insertUser, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::JavaUtil::List.java_class,Java::JavaUtil::List.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],args[2].map { |element| element },args[3].map { |element| element },block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:insertUser, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::JavaUtil::List.java_class,Java::JavaUtil::List.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],args[2].map { |element| element },args[3].map { |element| element },block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling insert_user(#{args[0]},#{args[1]},#{args[2]},#{args[3]})"
  end
end

- (self) setCollectionName(collectionName)

Set the name of the collection to be used. Defaults to DEFAULT_COLLECTION_NAME

Parameters:

  • collectionName (String)
    the name of the collection to be used for storing and reading user data

Returns:

  • (self)


349
350
351
352
353
354
355
356
357
358
359
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 349

def set_collection_name(*args)
  if args[0].class == String && !block_given?
    @j_del.java_method(:setCollectionName, [Java::java.lang.String.java_class]).call(args[0])
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling set_collection_name(#{args[0]})"
  end
end

- (self) setHashAlgorithm(hashAlgorithm)

The Hash Algorithm which is used by the current instance

Parameters:

  • hashAlgorithm (:SHA512, :PBKDF2)
    the HashAlgorithm to be set

Returns:

  • (self)


145
146
147
148
149
150
151
152
153
154
155
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 145

def set_hash_algorithm(*args)
  if args[0].class == Symbol && !block_given?
    @j_del.java_method(:setHashAlgorithm, [Java::IoVertxExtAuthMongo::HashAlgorithm.java_class]).call(Java::IoVertxExtAuthMongo::HashAlgorithm.valueOf(args[0].to_s))
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling set_hash_algorithm(#{args[0]})"
  end
end

- (self) setHashStrategy(hashStrategy)

The HashStrategy which is used by the current instance

Parameters:

Returns:

  • (self)


42
43
44
45
46
47
48
49
50
51
52
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 42

def set_hash_strategy(*args)
  if args[0].class.method_defined?(:j_del) && !block_given?
    @j_del.java_method(:setHashStrategy, [Java::IoVertxExtAuthMongo::HashStrategy.java_class]).call(args[0].j_del)
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling set_hash_strategy(#{args[0]})"
  end
end

- (self) setPasswordCredentialField(fieldName)

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

Parameters:

  • fieldName (String)
    the name of the field to be used

Returns:

  • (self)


161
162
163
164
165
166
167
168
169
170
171
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 161

def set_password_credential_field(*args)
  if args[0].class == String && !block_given?
    @j_del.java_method(:setPasswordCredentialField, [Java::java.lang.String.java_class]).call(args[0])
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling set_password_credential_field(#{args[0]})"
  end
end

- (self) setPasswordField(fieldName)

Set the name of the field to be used for the password Defaults to DEFAULT_PASSWORD_FIELD

Parameters:

  • fieldName (String)
    the name of the field to be used

Returns:

  • (self)


130
131
132
133
134
135
136
137
138
139
140
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 130

def set_password_field(*args)
  if args[0].class == String && !block_given?
    @j_del.java_method(:setPasswordField, [Java::java.lang.String.java_class]).call(args[0])
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling set_password_field(#{args[0]})"
  end
end

- (self) setPermissionField(fieldName)

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

Parameters:

  • fieldName (String)
    the name of the field to be used

Returns:

  • (self)


115
116
117
118
119
120
121
122
123
124
125
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 115

def set_permission_field(*args)
  if args[0].class == String && !block_given?
    @j_del.java_method(:setPermissionField, [Java::java.lang.String.java_class]).call(args[0])
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling set_permission_field(#{args[0]})"
  end
end

- (self) setRoleField(fieldName)

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

Parameters:

  • fieldName (String)
    the name of the field to be used

Returns:

  • (self)


72
73
74
75
76
77
78
79
80
81
82
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 72

def set_role_field(*args)
  if args[0].class == String && !block_given?
    @j_del.java_method(:setRoleField, [Java::java.lang.String.java_class]).call(args[0])
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling set_role_field(#{args[0]})"
  end
end

- (self) setSaltField(fieldName)

Set the name of the field to be used for the salt. Only used when HashStrategy#set_salt_style is set to

Parameters:

  • fieldName (String)
    the name of the field to be used

Returns:

  • (self)


216
217
218
219
220
221
222
223
224
225
226
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 216

def set_salt_field(*args)
  if args[0].class == String && !block_given?
    @j_del.java_method(:setSaltField, [Java::java.lang.String.java_class]).call(args[0])
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling set_salt_field(#{args[0]})"
  end
end

- (self) setUsernameCredentialField(fieldName)

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

Parameters:

  • fieldName (String)
    the name of the field to be used

Returns:

  • (self)


334
335
336
337
338
339
340
341
342
343
344
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 334

def set_username_credential_field(*args)
  if args[0].class == String && !block_given?
    @j_del.java_method(:setUsernameCredentialField, [Java::java.lang.String.java_class]).call(args[0])
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling set_username_credential_field(#{args[0]})"
  end
end

- (self) setUsernameField(fieldName)

Set the name of the field to be used for the username. Defaults to DEFAULT_USERNAME_FIELD

Parameters:

  • fieldName (String)
    the name of the field to be used

Returns:

  • (self)


297
298
299
300
301
302
303
304
305
306
307
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-auth-mongo/mongo_auth.rb', line 297

def set_username_field(*args)
  if args[0].class == String && !block_given?
    @j_del.java_method(:setUsernameField, [Java::java.lang.String.java_class]).call(args[0])
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling set_username_field(#{args[0]})"
  end
end