101 lines
3.4 KiB
Java
101 lines
3.4 KiB
Java
/*
|
|
* 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);
|
|
}
|
|
}
|
|
|