magma-auth


Namemagma-auth JSON
Version 0.0.3 PyPI version JSON
download
home_pageNone
SummaryMAGMA Indonesia Authentication
upload_time2025-07-11 12:40:27
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseNone
keywords magma indonesia
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # magma-auth
Python package for MAGMA Authentication

## Import module
```python
from magma_auth import auth
```

### Login using username and password
This will save (encrypted) your username and password.
```python
auth.login(
    username="<NIP>",
    password="<PASSWORD>",
    use_token=True, # Will try to look up saved token
    verbose=True
)
```
After logged in for the first time, you can log in without using username and password. You can use `auto()` method to
log in.
```python
auth.auto()
```
### Get your token
```python
token = auth.token
```
### Decode your token
```python
auth.decode(token)
```
### Get expired token
```python
auth.expired_at
```
### Get token from saved file
This method can be used after logged in for the first time.
```python
token = auth.load_token()
```
### Validate and check your token
This will check and validate token from MAGMA server.
```python
auth.validate_token(token)
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "magma-auth",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "magma, indonesia",
    "author": null,
    "author_email": "Martanto <martanto@live.com>, Devy Kamil Syahbana <devy.syahbana@gmail.com>, Syarif Abdul Manaf <riefmof@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/d1/e9/9830e6e9b3f4158a09e2f1b8dd559a90edfff5a0052d672c6442a1d90a0c/magma_auth-0.0.3.tar.gz",
    "platform": null,
    "description": "# magma-auth\nPython package for MAGMA Authentication\n\n## Import module\n```python\nfrom magma_auth import auth\n```\n\n### Login using username and password\nThis will save (encrypted) your username and password.\n```python\nauth.login(\n    username=\"<NIP>\",\n    password=\"<PASSWORD>\",\n    use_token=True, # Will try to look up saved token\n    verbose=True\n)\n```\nAfter logged in for the first time, you can log in without using username and password. You can use `auto()` method to\nlog in.\n```python\nauth.auto()\n```\n### Get your token\n```python\ntoken = auth.token\n```\n### Decode your token\n```python\nauth.decode(token)\n```\n### Get expired token\n```python\nauth.expired_at\n```\n### Get token from saved file\nThis method can be used after logged in for the first time.\n```python\ntoken = auth.load_token()\n```\n### Validate and check your token\nThis will check and validate token from MAGMA server.\n```python\nauth.validate_token(token)\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "MAGMA Indonesia Authentication",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/martanto/magma-auth",
        "Issues": "https://github.com/martanto/magma-auth/issues"
    },
    "split_keywords": [
        "magma",
        " indonesia"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "92680f063c9e9d35e6a86533d88646b83dab0c3c4868a2c06cbe26a98d72133f",
                "md5": "f5d54a3a443a4ea8ca530b96b02696a0",
                "sha256": "da025b08a87b0b6725c7a4cdcdbb91be08acfee6b3d1994631e01adc9a0876ab"
            },
            "downloads": -1,
            "filename": "magma_auth-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f5d54a3a443a4ea8ca530b96b02696a0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 6563,
            "upload_time": "2025-07-11T12:40:26",
            "upload_time_iso_8601": "2025-07-11T12:40:26.639553Z",
            "url": "https://files.pythonhosted.org/packages/92/68/0f063c9e9d35e6a86533d88646b83dab0c3c4868a2c06cbe26a98d72133f/magma_auth-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d1e99830e6e9b3f4158a09e2f1b8dd559a90edfff5a0052d672c6442a1d90a0c",
                "md5": "ca1e375b3c60f39aa3bf09a4ecdc484d",
                "sha256": "c13faeeba213f72a9a73e3a13dca04939977a4b31b48067b0f9b72ddec313507"
            },
            "downloads": -1,
            "filename": "magma_auth-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "ca1e375b3c60f39aa3bf09a4ecdc484d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 5735,
            "upload_time": "2025-07-11T12:40:27",
            "upload_time_iso_8601": "2025-07-11T12:40:27.490612Z",
            "url": "https://files.pythonhosted.org/packages/d1/e9/9830e6e9b3f4158a09e2f1b8dd559a90edfff5a0052d672c6442a1d90a0c/magma_auth-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-11 12:40:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "martanto",
    "github_project": "magma-auth",
    "github_not_found": true,
    "lcname": "magma-auth"
}
        
Elapsed time: 1.38323s