File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,8 @@ for creating client.
223
223
region: ' oss-cn-hangzhou' ,
224
224
accessKeyId: ' <access-key-id>' ,
225
225
accessKeySecret: ' <access-key-secret>' ,
226
- bucket: ' <bucket-name>'
226
+ bucket: ' <bucket-name>' ,
227
+ stsToken: ' <security-token>'
227
228
});
228
229
229
230
client .list ().then ((result ) => {
Original file line number Diff line number Diff line change @@ -90,6 +90,10 @@ function Client(options, ctx) {
90
90
module . exports = Client ;
91
91
92
92
Client . initOptions = function initOptions ( options ) {
93
+ if ( ! options . stsToken ) {
94
+ console . warn ( 'Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html' ) ;
95
+ }
96
+
93
97
if ( ! options
94
98
|| ! options . accessKeyId
95
99
|| ! options . accessKeySecret ) {
You can’t perform that action at this time.
0 commit comments