OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
API
/
swagger-ui-5.17.14
/
src
/
core
/
components
/
auth
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/07/2024 04:34:05 AM
rwxr-xr-x
📄
api-key-auth.jsx
2.45 KB
08/07/2024 04:34:04 AM
rw-r--r--
📄
auth-item.jsx
1.81 KB
08/07/2024 04:34:04 AM
rw-r--r--
📄
authorization-popup.jsx
1.98 KB
08/07/2024 04:34:04 AM
rw-r--r--
📄
authorize-btn.jsx
964 bytes
08/07/2024 04:34:04 AM
rw-r--r--
📄
authorize-operation-btn.jsx
976 bytes
08/07/2024 04:34:04 AM
rw-r--r--
📄
auths.jsx
3.73 KB
08/07/2024 04:34:04 AM
rw-r--r--
📄
basic-auth.jsx
3.05 KB
08/07/2024 04:34:04 AM
rw-r--r--
📄
error.jsx
482 bytes
08/07/2024 04:34:04 AM
rw-r--r--
📄
oauth2.jsx
10.71 KB
08/07/2024 04:34:04 AM
rw-r--r--
Editing: authorize-btn.jsx
Close
import React from "react" import PropTypes from "prop-types" export default class AuthorizeBtn extends React.Component { static propTypes = { onClick: PropTypes.func, isAuthorized: PropTypes.bool, showPopup: PropTypes.bool, getComponent: PropTypes.func.isRequired } render() { let { isAuthorized, showPopup, onClick, getComponent } = this.props //must be moved out of button component const AuthorizationPopup = getComponent("authorizationPopup", true) const LockAuthIcon = getComponent("LockAuthIcon", true) const UnlockAuthIcon = getComponent("UnlockAuthIcon", true) return ( <div className="auth-wrapper"> <button className={isAuthorized ? "btn authorize locked" : "btn authorize unlocked"} onClick={onClick}> <span>Authorize</span> {isAuthorized ? <LockAuthIcon /> : <UnlockAuthIcon />} </button> { showPopup && <AuthorizationPopup /> } </div> ) } }