com.myjeeva.spring.security.secureuri
Class SecureUriProviderImpl
java.lang.Object
com.myjeeva.spring.security.secureuri.SecureUriProviderImpl
- All Implemented Interfaces:
- SecureUriProvider
public class SecureUriProviderImpl
- extends Object
- implements SecureUriProvider
Implementation of SecureUriProvider
interface Secure link computation.
So generateSecureUri(String, long, String)
method generates the secure link with given params
- Since:
- v1.0.1
- Author:
- Jeevanandam ([email protected])
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SecureUriProviderImpl
public SecureUriProviderImpl()
setSecureUriMapper
public void setSecureUriMapper(SecureUriMapper secureUriMapper)
- Parameters:
secureUriMapper
- the secureUriMapper to set
generateSecureUri
public String generateSecureUri(String file,
long expiryTime,
String additionalParams)
- Generate a secure link/download link for the given parameters. This function will return a hashed URL.
for compute a secure URI below params are used.
- Specified by:
generateSecureUri
in interface SecureUriProvider
- Parameters:
file
- - String
- base URI, i.e everything after myjeeva.com in file path, including the leading slash
(for example: http://myjeeva.com/view/content/file.txt
http://myjeeva.com/view/content/index.jsp
http://myjeeva.com/content/sample.pdf)expiryTime
- - long
- expiry in milliseconds since current time. Use 0 for no expiryadditionalParams
- - String
- custom URL parameters (query String)
- Returns:
- secure link of hash URL - a
String
object