com.atlassian.security.random
Interface SecureTokenGenerator

All Known Implementing Classes:
DefaultSecureTokenGenerator

public interface SecureTokenGenerator

Generator for randomly generated Strings which can be used for cryptographically secure tokens.

These tokens might be used for cross-site request forgery (XSRF) prevention, authentication representation (eg. forgot password tokens, remember-me tokens).

Implementations are required to be thread-safe.


Method Summary
 String generateToken()
          Generates an randomly generated token that is suitable for use as an authentication token.
 

Method Detail

generateToken

String generateToken()
Generates an randomly generated token that is suitable for use as an authentication token. The token should be treated as an opaque String and not be parsed or interpreted by the client. The returned String will not be longer than 255 characters.

Returns:
a randomly generated opaque String.
See Also:
DefaultSecureTokenGenerator.generateToken()


Copyright © 2013 Atlassian. All rights reserved.