protected String generateToken ( String bureauId ) { String tokenSource = bureauId + "@" + System . currentTimeMillis ( ) + "r" + Math . random ( ) ; return StringUtil . md5hex ( tokenSource ) ; }
Create a hard - to - guess token that the bureau can use to authenticate itself when it tries to log in .