qiniu v0.2.2 Qiniu.Auth
Module about authorization.
See http://developer.qiniu.com/docs/v6/api/reference/security/
Summary
Functions
Get access token
Get authorized download url from plain url(host + key)
Get authorized download url from host and key
Generate token for uploading, which can be used in client or just server
Functions
Get access token
Fields
- url - e.g. http://rs.qiniu.com/move/bmV3ZG9jczpmaW5kX21hbi50eHQ=/bmV3ZG9jczpmaW5kLm1hbi50eHQ=
- body - HTTP body, “” by default
Get authorized download url from plain url(host + key)
Fields
- url - e.g. http://my-bucket.qiniudn.com/prefix/sunflower.jpg
- expires_in - seconds to expire
Get authorized download url from host and key
Fields
- host - e.g. http://my-bucket.qiniudn.com
- key - e.g. prefix/sunflower.jpg
- expires_in - seconds to expire
Specs
generate_uptoken(Qiniu.PutPolicy.t) :: String.t
Generate token for uploading, which can be used in client or just server.
See http://developer.qiniu.com/docs/v6/api/reference/security/upload-token.html
Examples
policy = Qiniu.PutPolicy.build("scope")
uptoken = Qiniu.Auth.generate_uptoken(policy)