package com.l7tech.security.token;

import com.l7tech.message.SshKnob;

public class SshSecurityToken implements SecurityToken, HasUsername {
   private final SecurityTokenType a;
   private final SshKnob.PublicKeyAuthentication b;

   public SshSecurityToken(SecurityTokenType var1, SshKnob.PublicKeyAuthentication var2) {
      this.a = var1;
      this.b = var2;
   }

   @Override
   public SecurityTokenType getType() {
      return this.a;
   }

   @Override
   public String getUsername() {
      return this.b == null ? null : this.b.getUserName();
   }

   public String getPublicKey() {
      return this.b == null ? null : this.b.getPublicKey();
   }
}
