-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
176 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
...mongo/src/main/generated/io/vertx/ext/auth/mongo/MongoAuthenticationOptionsConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
package io.vertx.ext.auth.mongo; | ||
|
||
import io.vertx.core.json.JsonObject; | ||
import io.vertx.core.json.JsonArray; | ||
import java.time.Instant; | ||
import java.time.format.DateTimeFormatter; | ||
import java.util.Base64; | ||
|
||
/** | ||
* Converter and mapper for {@link io.vertx.ext.auth.mongo.MongoAuthenticationOptions}. | ||
* NOTE: This class has been automatically generated from the {@link io.vertx.ext.auth.mongo.MongoAuthenticationOptions} original class using Vert.x codegen. | ||
*/ | ||
public class MongoAuthenticationOptionsConverter { | ||
|
||
private static final Base64.Decoder BASE64_DECODER = Base64.getUrlDecoder(); | ||
private static final Base64.Encoder BASE64_ENCODER = Base64.getUrlEncoder().withoutPadding(); | ||
|
||
static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, MongoAuthenticationOptions obj) { | ||
for (java.util.Map.Entry<String, Object> member : json) { | ||
switch (member.getKey()) { | ||
case "collectionName": | ||
if (member.getValue() instanceof String) { | ||
obj.setCollectionName((String)member.getValue()); | ||
} | ||
break; | ||
case "usernameField": | ||
if (member.getValue() instanceof String) { | ||
obj.setUsernameField((String)member.getValue()); | ||
} | ||
break; | ||
case "passwordField": | ||
if (member.getValue() instanceof String) { | ||
obj.setPasswordField((String)member.getValue()); | ||
} | ||
break; | ||
case "usernameCredentialField": | ||
if (member.getValue() instanceof String) { | ||
obj.setUsernameCredentialField((String)member.getValue()); | ||
} | ||
break; | ||
case "passwordCredentialField": | ||
if (member.getValue() instanceof String) { | ||
obj.setPasswordCredentialField((String)member.getValue()); | ||
} | ||
break; | ||
} | ||
} | ||
} | ||
|
||
static void toJson(MongoAuthenticationOptions obj, JsonObject json) { | ||
toJson(obj, json.getMap()); | ||
} | ||
|
||
static void toJson(MongoAuthenticationOptions obj, java.util.Map<String, Object> json) { | ||
if (obj.getCollectionName() != null) { | ||
json.put("collectionName", obj.getCollectionName()); | ||
} | ||
if (obj.getUsernameField() != null) { | ||
json.put("usernameField", obj.getUsernameField()); | ||
} | ||
if (obj.getPasswordField() != null) { | ||
json.put("passwordField", obj.getPasswordField()); | ||
} | ||
if (obj.getUsernameCredentialField() != null) { | ||
json.put("usernameCredentialField", obj.getUsernameCredentialField()); | ||
} | ||
if (obj.getPasswordCredentialField() != null) { | ||
json.put("passwordCredentialField", obj.getPasswordCredentialField()); | ||
} | ||
} | ||
} |
63 changes: 63 additions & 0 deletions
63
...-mongo/src/main/generated/io/vertx/ext/auth/mongo/MongoAuthorizationOptionsConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package io.vertx.ext.auth.mongo; | ||
|
||
import io.vertx.core.json.JsonObject; | ||
import io.vertx.core.json.JsonArray; | ||
import java.time.Instant; | ||
import java.time.format.DateTimeFormatter; | ||
import java.util.Base64; | ||
|
||
/** | ||
* Converter and mapper for {@link io.vertx.ext.auth.mongo.MongoAuthorizationOptions}. | ||
* NOTE: This class has been automatically generated from the {@link io.vertx.ext.auth.mongo.MongoAuthorizationOptions} original class using Vert.x codegen. | ||
*/ | ||
public class MongoAuthorizationOptionsConverter { | ||
|
||
private static final Base64.Decoder BASE64_DECODER = Base64.getUrlDecoder(); | ||
private static final Base64.Encoder BASE64_ENCODER = Base64.getUrlEncoder().withoutPadding(); | ||
|
||
static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, MongoAuthorizationOptions obj) { | ||
for (java.util.Map.Entry<String, Object> member : json) { | ||
switch (member.getKey()) { | ||
case "collectionName": | ||
if (member.getValue() instanceof String) { | ||
obj.setCollectionName((String)member.getValue()); | ||
} | ||
break; | ||
case "usernameField": | ||
if (member.getValue() instanceof String) { | ||
obj.setUsernameField((String)member.getValue()); | ||
} | ||
break; | ||
case "roleField": | ||
if (member.getValue() instanceof String) { | ||
obj.setRoleField((String)member.getValue()); | ||
} | ||
break; | ||
case "permissionField": | ||
if (member.getValue() instanceof String) { | ||
obj.setPermissionField((String)member.getValue()); | ||
} | ||
break; | ||
} | ||
} | ||
} | ||
|
||
static void toJson(MongoAuthorizationOptions obj, JsonObject json) { | ||
toJson(obj, json.getMap()); | ||
} | ||
|
||
static void toJson(MongoAuthorizationOptions obj, java.util.Map<String, Object> json) { | ||
if (obj.getCollectionName() != null) { | ||
json.put("collectionName", obj.getCollectionName()); | ||
} | ||
if (obj.getUsernameField() != null) { | ||
json.put("usernameField", obj.getUsernameField()); | ||
} | ||
if (obj.getRoleField() != null) { | ||
json.put("roleField", obj.getRoleField()); | ||
} | ||
if (obj.getPermissionField() != null) { | ||
json.put("permissionField", obj.getPermissionField()); | ||
} | ||
} | ||
} |