Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: glee authentication v2 #472

Closed
wants to merge 55 commits into from
Closed

feat: glee authentication v2 #472

wants to merge 55 commits into from

Conversation

oviecodes
Copy link
Contributor

@oviecodes oviecodes commented Jul 9, 2023

Description
This PR continues the discussion on the glee authentication issue #377 , it continues the discussion about glee authentication, from #460 .

Following the idea from @Souvikns to use a separate directory for authentication. Each file in this directory can hold both server and client authentication logic.

/** auth/serverName.ts **/

export function serverAuth({headers, done}) {
  // write logic for authentication 
  done()
}

export function clientAuth() {
  return {
    username: '',
    password: ''
  }
}

Steps to test run authentication

  • In the glee root directory, cd examples/anime-http/server,
  • The server directory, contains an auth directory that holds a trendingAnimeServer.ts file. The file contains some logic you can edit how you like but it must export the same functions as the code above
  • npm run dev to start the server in dev mode
  • The same logic applies to the client directory, cd examples/anime-http/server
  • Then look for auth/trendingAnime.js update accordingly then start the server.

Related issue(s)
Resolves #377

@Souvikns @KhudaDad414

@sonarcloud
Copy link

sonarcloud bot commented Jul 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 12 Code Smells

No Coverage information No Coverage information
0.6% 0.6% Duplication

@oviecodes oviecodes closed this Jul 9, 2023
@oviecodes oviecodes deleted the gleeAuthV1 branch September 5, 2023 12:26
@coveralls
Copy link

Pull Request Test Coverage Report for Build 5501211959

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 3 of 8 (37.5%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-1.1%) to 59.437%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/lib/adapter.ts 3 4 75.0%
src/lib/configs.ts 0 4 0.0%
Files with Coverage Reduction New Missed Lines %
src/lib/configs.ts 2 16.5%
Totals Coverage Status
Change from base Build 5463620227: -1.1%
Covered Lines: 332
Relevant Lines: 469

💛 - Coveralls

1 similar comment
@coveralls
Copy link

Pull Request Test Coverage Report for Build 5501211959

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 3 of 8 (37.5%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-1.1%) to 59.437%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/lib/adapter.ts 3 4 75.0%
src/lib/configs.ts 0 4 0.0%
Files with Coverage Reduction New Missed Lines %
src/lib/configs.ts 2 16.5%
Totals Coverage Status
Change from base Build 5463620227: -1.1%
Covered Lines: 332
Relevant Lines: 469

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants