private void add_yubikey_to_user ( String publicId , String username , String filename ) { try { File file = new File ( filename ) ; FileWriter writer = new FileWriter ( file , true ) ; writer . write ( "yk." + publicId + ".user = " + username + System . getProperty ( "line.separator" ) ) ; writer . close ( ) ; } catch ( IOException ex ) { log . error ( "Failed appending entry to file {}" , filename , ex ) ; } }
Stores an association between username and YubiKey publicId in filename .