[FIX] Cas auth (#2024)

Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
Djorkaeff Alexandre 2020-04-13 10:11:51 -03:00 committed by GitHub
parent 404c381ca2
commit acf70790cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -80,7 +80,8 @@ class AuthenticationWebView extends React.PureComponent {
const { navigation } = this.props;
const ssoToken = navigation.getParam('ssoToken');
const parsedUrl = parse(url, true);
if (parsedUrl.pathname?.includes('ticket') || parsedUrl.pathname?.includes('validate') || parsedUrl.query?.saml_idp_credentialToken) {
// ticket -> cas / validate & saml_idp_credentialToken -> saml
if (parsedUrl.pathname?.includes('validate') || parsedUrl.query?.ticket || parsedUrl.query?.saml_idp_credentialToken) {
let payload;
if (this.authType === 'saml') {
const token = parsedUrl.query?.saml_idp_credentialToken || ssoToken;