generated from metakgp/README.md
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: harshkhandeparkar <[email protected]>
- Loading branch information
1 parent
b89e947
commit 9027d3b
Showing
144 changed files
with
6,551 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
window.ALL_CRATES = ["iqps_backend"]; | ||
//{"start":21,"fragment_lengths":[14]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Documentation for Rustdoc"><title>Help</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/${f}">`).join(""))</script><link rel="stylesheet" href="./static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="./static.files/rustdoc-492a78a4a87dcc01.css"><meta name="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="iqps_backend" data-themes="" data-resource-suffix="" data-rustdoc-version="1.82.0 (f6e511eec 2024-10-15)" data-channel="1.82.0" data-search-js="search-a99f1315e7cc5121.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="./static.files/storage-118b08c4c78b968e.js"></script><script defer src="./static.files/main-921df33f47b8780c.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-3b12f09e550e0385.css"></noscript><link rel="alternate icon" type="image/png" href="./static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="./static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.82.0</span></h2></div><div class="version">(f6e511eec 2024-10-15)</div><h2 class="location">Help</h2><div class="sidebar-elems"></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Rustdoc help</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section><p>You need to enable JavaScript to use keyboard commands or search.</p><p>For more information, browse the <a href="https://doc.rust-lang.org/rustdoc/">rustdoc handbook</a>.</p></section></noscript></section></div></main></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of all items in this crate"><title>List of all items in this crate</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-492a78a4a87dcc01.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="iqps_backend" data-themes="" data-resource-suffix="" data-rustdoc-version="1.82.0 (f6e511eec 2024-10-15)" data-channel="1.82.0" data-search-js="search-a99f1315e7cc5121.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-118b08c4c78b968e.js"></script><script defer src="../static.files/main-921df33f47b8780c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-3b12f09e550e0385.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../iqps_backend/index.html">iqps_<wbr>backend</a><span class="version">0.1.0</span></h2></div><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Aliases</a></li></ul></section></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><h1>List of all items</h1><h3 id="structs">Structs</h3><ul class="all-items"><li><a href="auth/struct.Auth.html">auth::Auth</a></li><li><a href="auth/struct.GithubAccessTokenResponse.html">auth::GithubAccessTokenResponse</a></li><li><a href="auth/struct.GithubMembershipResponse.html">auth::GithubMembershipResponse</a></li><li><a href="auth/struct.GithubUserResponse.html">auth::GithubUserResponse</a></li><li><a href="db/struct.Breh.html">db::Breh</a></li><li><a href="db/struct.Database.html">db::Database</a></li><li><a href="db/models/struct.DBAdminDashboardQP.html">db::models::DBAdminDashboardQP</a></li><li><a href="db/models/struct.DBSearchQP.html">db::models::DBSearchQP</a></li><li><a href="env/struct.EnvVars.html">env::EnvVars</a></li><li><a href="pathutils/struct.PathTriad.html">pathutils::PathTriad</a></li><li><a href="pathutils/struct.Paths.html">pathutils::Paths</a></li><li><a href="qp/struct.AdminDashboardQP.html">qp::AdminDashboardQP</a></li><li><a href="qp/struct.SearchQP.html">qp::SearchQP</a></li><li><a href="routing/struct.AppError.html">routing::AppError</a></li><li><a href="routing/struct.BackendResponse.html">routing::BackendResponse</a></li><li><a href="routing/struct.RouterState.html">routing::RouterState</a></li><li><a href="routing/handlers/struct.DeleteReq.html">routing::handlers::DeleteReq</a></li><li><a href="routing/handlers/struct.EditReq.html">routing::handlers::EditReq</a></li><li><a href="routing/handlers/struct.FileDetails.html">routing::handlers::FileDetails</a></li><li><a href="routing/handlers/struct.OAuthReq.html">routing::handlers::OAuthReq</a></li><li><a href="routing/handlers/struct.OAuthRes.html">routing::handlers::OAuthRes</a></li><li><a href="routing/handlers/struct.ProfileRes.html">routing::handlers::ProfileRes</a></li><li><a href="routing/handlers/struct.UploadStatus.html">routing::handlers::UploadStatus</a></li></ul><h3 id="enums">Enums</h3><ul class="all-items"><li><a href="db/queries/enum.ExamFilter.html">db::queries::ExamFilter</a></li><li><a href="pathutils/enum.PaperCategory.html">pathutils::PaperCategory</a></li><li><a href="qp/enum.Exam.html">qp::Exam</a></li><li><a href="qp/enum.Semester.html">qp::Semester</a></li><li><a href="routing/enum.Status.html">routing::Status</a></li></ul><h3 id="functions">Functions</h3><ul class="all-items"><li><a href="auth/fn.authenticate_user.html">auth::authenticate_user</a></li><li><a href="auth/fn.generate_token.html">auth::generate_token</a></li><li><a href="auth/fn.verify_token.html">auth::verify_token</a></li><li><a href="db/queries/fn.get_all_unapproved_query.html">db::queries::get_all_unapproved_query</a></li><li><a href="db/queries/fn.get_edit_paper_query.html">db::queries::get_edit_paper_query</a></li><li><a href="db/queries/fn.get_get_paper_by_id_query.html">db::queries::get_get_paper_by_id_query</a></li><li><a href="db/queries/fn.get_qp_search_query.html">db::queries::get_qp_search_query</a></li><li><a href="db/queries/fn.get_similar_papers_query.html">db::queries::get_similar_papers_query</a></li><li><a href="fn.main.html">main</a></li><li><a href="routing/fn.get_router.html">routing::get_router</a></li><li><a href="routing/handlers/fn.delete.html">routing::handlers::delete</a></li><li><a href="routing/handlers/fn.edit.html">routing::handlers::edit</a></li><li><a href="routing/handlers/fn.get_unapproved.html">routing::handlers::get_unapproved</a></li><li><a href="routing/handlers/fn.healthcheck.html">routing::handlers::healthcheck</a></li><li><a href="routing/handlers/fn.oauth.html">routing::handlers::oauth</a></li><li><a href="routing/handlers/fn.profile.html">routing::handlers::profile</a></li><li><a href="routing/handlers/fn.search.html">routing::handlers::search</a></li><li><a href="routing/handlers/fn.similar.html">routing::handlers::similar</a></li><li><a href="routing/handlers/fn.upload.html">routing::handlers::upload</a></li><li><a href="routing/middleware/fn.verify_jwt_middleware.html">routing::middleware::verify_jwt_middleware</a></li></ul><h3 id="types">Type Aliases</h3><ul class="all-items"><li><a href="routing/handlers/type.HandlerReturn.html">routing::handlers::HandlerReturn</a></li></ul><h3 id="constants">Constants</h3><ul class="all-items"><li><a href="db/queries/constant.ADMIN_DASHBOARD_QP_FIELDS.html">db::queries::ADMIN_DASHBOARD_QP_FIELDS</a></li><li><a href="db/queries/constant.INSERT_NEW_QP.html">db::queries::INSERT_NEW_QP</a></li><li><a href="db/queries/constant.SEARCH_QP_FIELDS.html">db::queries::SEARCH_QP_FIELDS</a></li><li><a href="db/queries/constant.SOFT_DELETE_BY_ID.html">db::queries::SOFT_DELETE_BY_ID</a></li><li><a href="db/queries/constant.UPDATE_FILELINK.html">db::queries::UPDATE_FILELINK</a></li><li><a href="routing/handlers/constant.FILE_SIZE_LIMIT.html">routing::handlers::FILE_SIZE_LIMIT</a></li></ul></section></div></main></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Takes a Github OAuth code and creates a JWT authentication token for the user"><title>authenticate_user in iqps_backend::auth - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-492a78a4a87dcc01.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iqps_backend" data-themes="" data-resource-suffix="" data-rustdoc-version="1.82.0 (f6e511eec 2024-10-15)" data-channel="1.82.0" data-search-js="search-a99f1315e7cc5121.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-921df33f47b8780c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-3b12f09e550e0385.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iqps_backend/index.html">iqps_<wbr>backend</a><span class="version">0.1.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iqps_<wbr>backend::<wbr>auth</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">iqps_backend</a>::<wbr><a href="index.html">auth</a>::<wbr><a class="fn" href="#">authenticate_user</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iqps_backend/auth.rs.html#102-193">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub async fn authenticate_user( | ||
code: &<a class="struct" href="https://doc.rust-lang.org/1.82.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, | ||
env_vars: &<a class="struct" href="../env/struct.EnvVars.html" title="struct iqps_backend::env::EnvVars">EnvVars</a>, | ||
) -> <a class="enum" href="https://doc.rust-lang.org/1.82.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/1.82.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/1.82.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>, <a class="struct" href="https://docs.rs/eyre/0.6.12/eyre/struct.Report.html" title="struct eyre::Report">Error</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Takes a Github OAuth code and creates a JWT authentication token for the user</p> | ||
<ol> | ||
<li>Uses the OAuth code to get an access token.</li> | ||
<li>Uses the access token to get the user’s username.</li> | ||
<li>Uses the username and and a admin’s access token to verify whether the user is a member of the admins github team.</li> | ||
</ol> | ||
<p>Returns the JWT if the user is authenticated, <code>None</code> otherwise.</p> | ||
</div></details></section></div></main></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Generates a JWT with the username (for claims) and secret key"><title>generate_token in iqps_backend::auth - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-492a78a4a87dcc01.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iqps_backend" data-themes="" data-resource-suffix="" data-rustdoc-version="1.82.0 (f6e511eec 2024-10-15)" data-channel="1.82.0" data-search-js="search-a99f1315e7cc5121.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-921df33f47b8780c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-3b12f09e550e0385.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iqps_backend/index.html">iqps_<wbr>backend</a><span class="version">0.1.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In iqps_<wbr>backend::<wbr>auth</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">iqps_backend</a>::<wbr><a href="index.html">auth</a>::<wbr><a class="fn" href="#">generate_token</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/iqps_backend/auth.rs.html#47-79">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>async fn generate_token( | ||
username: &<a class="primitive" href="https://doc.rust-lang.org/1.82.0/std/primitive.str.html">str</a>, | ||
env_vars: &<a class="struct" href="../env/struct.EnvVars.html" title="struct iqps_backend::env::EnvVars">EnvVars</a>, | ||
) -> <a class="enum" href="https://doc.rust-lang.org/1.82.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.82.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="struct" href="https://docs.rs/eyre/0.6.12/eyre/struct.Report.html" title="struct eyre::Report">Error</a>></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Generates a JWT with the username (for claims) and secret key</p> | ||
</div></details></section></div></main></body></html> |
Oops, something went wrong.