Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
02dc3f49
Commit
02dc3f49
authored
Nov 15, 2016
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jwt token on open
parent
5b80b6a3
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
7 deletions
+41
-7
common/apiBase.js
common/apiBase.js
+5
-1
common/apiCommon.js
common/apiCommon.js
+22
-0
common/docscoapi.js
common/docscoapi.js
+13
-5
common/docscoapicommon.js
common/docscoapicommon.js
+1
-1
No files found.
common/apiBase.js
View file @
02dc3f49
...
...
@@ -407,7 +407,11 @@
rData
[
"
userconnectionid
"
]
=
this
.
CoAuthoringApi
.
getUserConnectionId
();
}
}
this
.
CoAuthoringApi
.
auth
(
this
.
getViewMode
(),
rData
);
if
(
isVersionHistory
)
{
this
.
CoAuthoringApi
.
versionHistory
(
rData
);
}
else
{
this
.
CoAuthoringApi
.
auth
(
this
.
getViewMode
(),
rData
);
}
if
(
!
isRepeat
)
{
this
.
sync_StartAction
(
c_oAscAsyncActionType
.
BlockInteraction
,
c_oAscAsyncAction
.
Open
);
...
...
common/apiCommon.js
View file @
02dc3f49
...
...
@@ -2488,6 +2488,9 @@
if
(
typeof
obj
.
VKey
!=
'
undefined
'
)
{
this
.
VKey
=
obj
.
VKey
;
}
if
(
typeof
obj
.
Token
!=
'
undefined
'
)
{
this
.
Token
=
obj
.
Token
;
}
if
(
typeof
obj
.
UserId
!=
'
undefined
'
)
{
this
.
UserId
=
obj
.
UserId
;
}
...
...
@@ -2502,6 +2505,15 @@
if
(
typeof
obj
.
CallbackUrl
!=
'
undefined
'
)
{
this
.
CallbackUrl
=
obj
.
CallbackUrl
;
}
if
(
typeof
obj
.
Mode
!=
'
undefined
'
)
{
this
.
Mode
=
obj
.
Mode
;
}
if
(
typeof
obj
.
Permissions
!=
'
undefined
'
)
{
this
.
Permissions
=
obj
.
Permissions
;
}
if
(
typeof
obj
.
Lang
!=
'
undefined
'
)
{
this
.
Lang
=
obj
.
Lang
;
}
if
(
obj
.
OfflineApp
===
true
)
{
this
.
OfflineApp
=
true
;
}
...
...
@@ -2514,10 +2526,14 @@
this
.
Title
=
null
;
this
.
Format
=
null
;
this
.
VKey
=
null
;
this
.
Token
=
null
;
this
.
UserInfo
=
null
;
this
.
Options
=
null
;
this
.
CallbackUrl
=
null
;
this
.
TemplateReplacement
=
null
;
this
.
Mode
=
null
;
this
.
Permissions
=
null
;
this
.
Lang
=
null
;
}
}
...
...
@@ -2551,6 +2567,12 @@
asc_CDocInfo
.
prototype
.
put_VKey
=
asc_CDocInfo
.
prototype
.
asc_putVKey
=
function
(
v
)
{
this
.
VKey
=
v
;
};
asc_CDocInfo
.
prototype
.
get_Token
=
asc_CDocInfo
.
prototype
.
asc_getToken
=
function
()
{
return
this
.
Token
;
};
asc_CDocInfo
.
prototype
.
put_Token
=
asc_CDocInfo
.
prototype
.
asc_putToken
=
function
(
v
)
{
this
.
Token
=
v
;
};
asc_CDocInfo
.
prototype
.
get_OfflineApp
=
asc_CDocInfo
.
prototype
.
asc_getOfflineApp
=
function
()
{
return
this
.
OfflineApp
;
};
...
...
common/docscoapi.js
View file @
02dc3f49
...
...
@@ -341,6 +341,12 @@
}
};
CDocsCoApi
.
prototype
.
versionHistory
=
function
(
data
)
{
if
(
this
.
_CoAuthoringApi
&&
this
.
_onlineWork
)
{
this
.
_CoAuthoringApi
.
versionHistory
(
data
);
}
};
CDocsCoApi
.
prototype
.
callback_OnAuthParticipantsChanged
=
function
(
e
,
count
)
{
if
(
this
.
onAuthParticipantsChanged
)
{
this
.
onAuthParticipantsChanged
(
e
,
count
);
...
...
@@ -806,6 +812,10 @@
this
.
_send
({
'
type
'
:
'
extendSession
'
,
'
idletime
'
:
idleTime
});
};
DocsCoApi
.
prototype
.
versionHistory
=
function
(
data
)
{
this
.
_send
({
'
type
'
:
'
versionHistory
'
,
'
cmd
'
:
data
});
};
DocsCoApi
.
prototype
.
openDocument
=
function
(
data
)
{
this
.
_send
({
"
type
"
:
"
openDocument
"
,
"
message
"
:
data
});
};
...
...
@@ -1295,7 +1305,7 @@
this
.
mode
=
docInfo
.
get_Mode
();
this
.
permissions
=
docInfo
.
get_Permissions
();
this
.
lang
=
docInfo
.
get_Lang
();
this
.
jwt
=
docInfo
.
get_
VKey
();
this
.
jwt
=
docInfo
.
get_
Token
();
this
.
setDocId
(
docid
);
this
.
_initSocksJs
();
...
...
@@ -1494,12 +1504,10 @@
return
Asc
.
c_oAscError
.
ID
.
CoAuthoringDisconnect
;
}
else
if
(
c_oCloseCode
.
accessDeny
===
opt_closeCode
)
{
return
Asc
.
c_oAscError
.
ID
.
CoAuthoringDisconnect
;
}
else
if
(
c_oCloseCode
.
jwtEmptySecret
===
opt_closeCode
)
{
return
Asc
.
c_oAscError
.
ID
.
CoAuthoringDisconnect
;
}
else
if
(
c_oCloseCode
.
jwtExpired
===
opt_closeCode
)
{
return
Asc
.
c_oAscError
.
ID
.
CoAuthoringDisconnect
;
return
Asc
.
c_oAscError
.
ID
.
KeyExpire
;
}
else
if
(
c_oCloseCode
.
jwtError
===
opt_closeCode
)
{
return
Asc
.
c_oAscError
.
ID
.
CoAuthoringDisconnec
t
;
return
Asc
.
c_oAscError
.
ID
.
VKeyEncryp
t
;
}
return
this
.
isCloseCoAuthoring
?
Asc
.
c_oAscError
.
ID
.
UserDrop
:
Asc
.
c_oAscError
.
ID
.
CoAuthoringDisconnect
;
};
...
...
common/docscoapicommon.js
View file @
02dc3f49
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment