update for sso

This commit is contained in:
2021-07-28 17:28:25 +05:30
parent 8aad24600a
commit f1f4d10368
55 changed files with 211 additions and 86 deletions

11
src/views/secret/index.js Normal file
View File

@ -0,0 +1,11 @@
import React from 'react'
function Secret() {
return (
<div>
This is a protected page
</div>
)
}
export default Secret

62
src/views/sso/index.js Normal file
View File

@ -0,0 +1,62 @@
import React from 'react'
import { Link } from 'react-router-dom'
import {
CButton,
CCard,
CCardBody,
CCardGroup,
CCol,
CContainer,
CForm,
CInput,
CInputGroup,
CInputGroupPrepend,
CInputGroupText,
CRow
} from '@coreui/react'
import CIcon from '@coreui/icons-react'
function Sso() {
function launchsso() {
console.log("launch sso");
window.open("https://fsbsso.sumasen.net/Shibboleth.sso/Login", "_self");
}
return (
<div className="c-app c-default-layout flex-row align-items-center">
<CContainer>
<CRow className="justify-content-center">
<CCol md="8">
<CCardGroup>
<CCard className="p-4">
<CCardBody>
<CForm>
<h1>Login</h1>
<p className="text-muted">Click here to Sign In with SSO</p>
<CRow>
<CCol>
<CButton color="primary" className="px-4" onClick={launchsso}>Login with SSO</CButton>
</CCol>
</CRow>
</CForm>
</CCardBody>
</CCard>
<CCard className="text-white bg-primary py-5 d-md-down-none" style={{ width: '44%' }}>
<CCardBody className="text-center">
<div>
<h2>How to Login</h2>
<p>This uses SSO Login, by clicking the link will redirect to SSO login page</p>
</div>
</CCardBody>
</CCard>
</CCardGroup>
</CCol>
</CRow>
</CContainer>
</div>
)
}
export default Sso