title: Restlet how to decode secret in HTTP basic authentication
body: <p>I have the following class handling one of my routes: </p>
  
  <pre><code>public class HotelsSrv extends ServerResource implements 
     HotelsListResource {
     private String hotelId;
  
     @Override
     protected void doInit() throws ResourceException {
         super.doInit();
         String str;
         String secret = getRequest().getChallengeResponse().getSecret().toString();
         byte[] bytes = new BASE64Decoder().decodeBuffer(secret)
         str = new String(bytes);
  
         System.out.println("user: "+getRequest().getChallengeResponse().getIdentifier());
  
         System.out.println("password: "+str);
  }
  </code></pre>
  
  <p>I am trying to decode the secret so I can verify it using custom procedure but this line raises unknown exception:</p>
  
  <pre><code>    byte[] bytes = new BASE64Decoder().decodeBuffer(secret)
  </code></pre>