link start!
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package com.tridium.user;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import javax.baja.security.BICredentials;
|
||||
import javax.baja.security.BIUserCredentials;
|
||||
import javax.baja.security.BUsernameAndPassword;
|
||||
import javax.baja.sys.BString;
|
||||
import javax.baja.sys.BStruct;
|
||||
import javax.baja.sys.BValue;
|
||||
import javax.baja.sys.Property;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
|
||||
/*
|
||||
* Illegal identifiers - consider using --renameillegalidents true
|
||||
*/
|
||||
public class BRetrievePasswordCredential
|
||||
extends BStruct
|
||||
implements BICredentials,
|
||||
BIUserCredentials {
|
||||
public static final Property username = BRetrievePasswordCredential.newProperty(0, BString.DEFAULT, null);
|
||||
public static final Property email = BRetrievePasswordCredential.newProperty(0, BString.DEFAULT, null);
|
||||
public static final Type TYPE;
|
||||
static /* synthetic */ Class class$com$tridium$user$BRetrievePasswordCredential;
|
||||
|
||||
public String getUsername() {
|
||||
return this.getString(username);
|
||||
}
|
||||
|
||||
public void setUsername(String string) {
|
||||
this.setString(username, string, null);
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return this.getString(email);
|
||||
}
|
||||
|
||||
public void setEmail(String string) {
|
||||
this.setString(email, string, null);
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public byte[] encodeCredentials() throws IOException {
|
||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
DataOutputStream dataOutputStream = new DataOutputStream(byteArrayOutputStream);
|
||||
BString.make(this.getUsername()).encode(dataOutputStream);
|
||||
BString.make(this.getEmail()).encode(dataOutputStream);
|
||||
dataOutputStream.flush();
|
||||
return byteArrayOutputStream.toByteArray();
|
||||
}
|
||||
|
||||
public BICredentials decodeCredentials(byte[] byArray) throws IOException {
|
||||
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byArray);
|
||||
DataInputStream dataInputStream = new DataInputStream(byteArrayInputStream);
|
||||
BUsernameAndPassword bUsernameAndPassword = (BUsernameAndPassword)this.newCopy();
|
||||
bUsernameAndPassword.set(username, (BValue)BString.DEFAULT.decode(dataInputStream));
|
||||
bUsernameAndPassword.set(email, (BValue)BString.DEFAULT.decode(dataInputStream));
|
||||
return bUsernameAndPassword;
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class(String string, boolean bl) {
|
||||
try {
|
||||
Class<?> clazz = Class.forName(string);
|
||||
if (!bl) {
|
||||
clazz = clazz.getComponentType();
|
||||
}
|
||||
return clazz;
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public BRetrievePasswordCredential(String string, String string2) {
|
||||
this.setUsername(string);
|
||||
this.setEmail(string2);
|
||||
}
|
||||
|
||||
public BRetrievePasswordCredential() {
|
||||
}
|
||||
|
||||
static {
|
||||
Class clazz = class$com$tridium$user$BRetrievePasswordCredential;
|
||||
if (clazz == null) {
|
||||
clazz = class$com$tridium$user$BRetrievePasswordCredential = BRetrievePasswordCredential.class("[Lcom.tridium.user.BRetrievePasswordCredential;", false);
|
||||
}
|
||||
TYPE = Sys.loadType(clazz);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package com.tridium.user;
|
||||
|
||||
import com.tridium.user.BUserServicePasswordConfiguration;
|
||||
import javax.baja.security.BPasswordHistory;
|
||||
import javax.baja.sys.Action;
|
||||
import javax.baja.sys.BAbsTime;
|
||||
import javax.baja.sys.BComponent;
|
||||
import javax.baja.sys.BFacets;
|
||||
import javax.baja.sys.BIMixIn;
|
||||
import javax.baja.sys.BIcon;
|
||||
import javax.baja.sys.BValue;
|
||||
import javax.baja.sys.Context;
|
||||
import javax.baja.sys.Property;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
import javax.baja.user.BUser;
|
||||
import javax.baja.user.BUserService;
|
||||
import javax.baja.util.Lexicon;
|
||||
|
||||
/*
|
||||
* Illegal identifiers - consider using --renameillegalidents true
|
||||
*/
|
||||
public class BUserPasswordConfiguration
|
||||
extends BComponent
|
||||
implements BIMixIn {
|
||||
public static final Property passwordHistory = BUserPasswordConfiguration.newProperty(69, new BPasswordHistory(), null);
|
||||
public static final Property forceResetAtNextLogin = BUserPasswordConfiguration.newProperty(0, false, null);
|
||||
public static final Property expiration = BUserPasswordConfiguration.newProperty(0, BAbsTime.NULL, BFacets.make("fieldEditor", "wbutil:ExpirationFE"));
|
||||
public static final Action passwordModified = BUserPasswordConfiguration.newAction(4, null);
|
||||
public static final Type TYPE;
|
||||
private static final BIcon icon;
|
||||
static /* synthetic */ Class class$com$tridium$user$BUserPasswordConfiguration;
|
||||
static /* synthetic */ Class class$com$tridium$user$BUserServicePasswordConfiguration;
|
||||
|
||||
public BPasswordHistory getPasswordHistory() {
|
||||
return (BPasswordHistory)this.get(passwordHistory);
|
||||
}
|
||||
|
||||
public void setPasswordHistory(BPasswordHistory bPasswordHistory) {
|
||||
this.set(passwordHistory, (BValue)bPasswordHistory, null);
|
||||
}
|
||||
|
||||
public boolean getForceResetAtNextLogin() {
|
||||
return this.getBoolean(forceResetAtNextLogin);
|
||||
}
|
||||
|
||||
public void setForceResetAtNextLogin(boolean bl) {
|
||||
this.setBoolean(forceResetAtNextLogin, bl, null);
|
||||
}
|
||||
|
||||
public BAbsTime getExpiration() {
|
||||
return (BAbsTime)this.get(expiration);
|
||||
}
|
||||
|
||||
public void setExpiration(BAbsTime bAbsTime) {
|
||||
this.set(expiration, (BValue)bAbsTime, null);
|
||||
}
|
||||
|
||||
public void passwordModified() {
|
||||
this.invoke(passwordModified, null, null);
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public void doPasswordModified() {
|
||||
try {
|
||||
String string = "";
|
||||
int n = Integer.MAX_VALUE;
|
||||
if (this.isMounted() && this.getParent() instanceof BUser) {
|
||||
BUserService bUserService;
|
||||
BUser bUser = (BUser)this.getParent();
|
||||
string = bUser.getUsername();
|
||||
if (bUser.getParent() instanceof BUserService && (bUserService = (BUserService)bUser.getParent()).canUsePasswordFeatures(bUser)) {
|
||||
BUserServicePasswordConfiguration[] bUserServicePasswordConfigurationArray;
|
||||
Class clazz = class$com$tridium$user$BUserServicePasswordConfiguration;
|
||||
if (clazz == null) {
|
||||
clazz = class$com$tridium$user$BUserServicePasswordConfiguration = BUserPasswordConfiguration.class("[Lcom.tridium.user.BUserServicePasswordConfiguration;", false);
|
||||
}
|
||||
if ((bUserServicePasswordConfigurationArray = (BUserServicePasswordConfiguration[])bUserService.getChildren(clazz)).length > 0) {
|
||||
if (!this.getExpiration().isNull()) {
|
||||
this.setExpiration(BAbsTime.now().add(bUserServicePasswordConfigurationArray[0].getExpirationInterval()));
|
||||
}
|
||||
n = bUserServicePasswordConfigurationArray[0].getPasswordHistoryLength();
|
||||
}
|
||||
}
|
||||
}
|
||||
this.setPasswordHistory(this.getPasswordHistory().add(string, ((BUser)this.getParent()).getPassword(), n));
|
||||
}
|
||||
catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public String getDisplayNameInParent(Context context) {
|
||||
return Lexicon.make(this.getType().getModule(), context).get("user.password.configuration");
|
||||
}
|
||||
|
||||
public BIcon getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class(String string, boolean bl) {
|
||||
try {
|
||||
Class<?> clazz = Class.forName(string);
|
||||
if (!bl) {
|
||||
clazz = clazz.getComponentType();
|
||||
}
|
||||
return clazz;
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
Class clazz = class$com$tridium$user$BUserPasswordConfiguration;
|
||||
if (clazz == null) {
|
||||
clazz = class$com$tridium$user$BUserPasswordConfiguration = BUserPasswordConfiguration.class("[Lcom.tridium.user.BUserPasswordConfiguration;", false);
|
||||
}
|
||||
TYPE = Sys.loadType(clazz);
|
||||
icon = BIcon.std("keys.png");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package com.tridium.user;
|
||||
|
||||
import javax.baja.sys.BBoolean;
|
||||
import javax.baja.sys.BComponent;
|
||||
import javax.baja.sys.BFacets;
|
||||
import javax.baja.sys.BIMixIn;
|
||||
import javax.baja.sys.BIcon;
|
||||
import javax.baja.sys.BInteger;
|
||||
import javax.baja.sys.BRelTime;
|
||||
import javax.baja.sys.BValue;
|
||||
import javax.baja.sys.Context;
|
||||
import javax.baja.sys.Property;
|
||||
import javax.baja.sys.Sys;
|
||||
import javax.baja.sys.Type;
|
||||
import javax.baja.util.Lexicon;
|
||||
|
||||
/*
|
||||
* Illegal identifiers - consider using --renameillegalidents true
|
||||
*/
|
||||
public class BUserServicePasswordConfiguration
|
||||
extends BComponent
|
||||
implements BIMixIn {
|
||||
public static final Property expirationInterval = BUserServicePasswordConfiguration.newProperty(0, BRelTime.makeDays(365), BFacets.make("showDay", BBoolean.TRUE));
|
||||
public static final Property warningPeriod = BUserServicePasswordConfiguration.newProperty(0, BRelTime.makeDays(30), BFacets.make("showDay", BBoolean.TRUE));
|
||||
public static final Property passwordHistoryLength = BUserServicePasswordConfiguration.newProperty(0, 0, BFacets.make("min", BInteger.make(0), "max", BInteger.make(10)));
|
||||
public static final Type TYPE;
|
||||
private static final BIcon icon;
|
||||
static /* synthetic */ Class class$com$tridium$user$BUserServicePasswordConfiguration;
|
||||
|
||||
public BRelTime getExpirationInterval() {
|
||||
return (BRelTime)this.get(expirationInterval);
|
||||
}
|
||||
|
||||
public void setExpirationInterval(BRelTime bRelTime) {
|
||||
this.set(expirationInterval, (BValue)bRelTime, null);
|
||||
}
|
||||
|
||||
public BRelTime getWarningPeriod() {
|
||||
return (BRelTime)this.get(warningPeriod);
|
||||
}
|
||||
|
||||
public void setWarningPeriod(BRelTime bRelTime) {
|
||||
this.set(warningPeriod, (BValue)bRelTime, null);
|
||||
}
|
||||
|
||||
public int getPasswordHistoryLength() {
|
||||
return this.getInt(passwordHistoryLength);
|
||||
}
|
||||
|
||||
public void setPasswordHistoryLength(int n) {
|
||||
this.setInt(passwordHistoryLength, n, null);
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public String getDisplayNameInParent(Context context) {
|
||||
return Lexicon.make(this.getType().getModule(), context).get("user.password.configuration");
|
||||
}
|
||||
|
||||
public BIcon getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
static /* synthetic */ Class class(String string, boolean bl) {
|
||||
try {
|
||||
Class<?> clazz = Class.forName(string);
|
||||
if (!bl) {
|
||||
clazz = clazz.getComponentType();
|
||||
}
|
||||
return clazz;
|
||||
}
|
||||
catch (ClassNotFoundException classNotFoundException) {
|
||||
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
Class clazz = class$com$tridium$user$BUserServicePasswordConfiguration;
|
||||
if (clazz == null) {
|
||||
clazz = class$com$tridium$user$BUserServicePasswordConfiguration = BUserServicePasswordConfiguration.class("[Lcom.tridium.user.BUserServicePasswordConfiguration;", false);
|
||||
}
|
||||
TYPE = Sys.loadType(clazz);
|
||||
icon = BIcon.std("keys.png");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user