1 10 11 package org.mule.extras.pgp; 12 13 import java.util.Map ; 14 15 import cryptix.message.Message; 16 import cryptix.pki.KeyBundle; 17 18 import org.mule.umo.security.UMOAuthentication; 19 20 23 public class PGPAuthentication implements UMOAuthentication 24 { 25 26 boolean authenticated = false; 27 private String userName; 28 private Message message; 29 private KeyBundle userKeyBundle = null; 30 31 public PGPAuthentication(String userName, Message message) 32 { 33 this.userName = userName; 34 this.message = message; 35 } 36 37 42 public void setAuthenticated(boolean b) 43 { 44 authenticated = b; 45 } 46 47 52 public boolean isAuthenticated() 53 { 54 return authenticated; 55 } 56 57 62 public Object getCredentials() 63 { 64 return message; 65 } 66 67 72 public Object getDetails() 73 { 74 return userKeyBundle; 75 } 76 77 protected void setDetails(KeyBundle kb) 78 { 79 userKeyBundle = kb; 80 } 81 82 87 public Object getPrincipal() 88 { 89 return userName; 90 } 91 92 public Map getProperties() 93 { 94 return null; 96 } 97 98 public void setProperties(Map securityMode) 99 { 100 102 } 103 104 } 105 | Popular Tags |