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

CTConfig: session based auth #2

Closed
DumbergerL opened this issue Apr 9, 2021 · 2 comments · Fixed by #170
Closed

CTConfig: session based auth #2

DumbergerL opened this issue Apr 9, 2021 · 2 comments · Fixed by #170
Assignees
Labels
enhancement New feature or request

Comments

@DumbergerL
Copy link
Contributor

Handle diffrent logged in users as session. Enable switching between these sessions, to use the diffrent ct permissons of the users

@DumbergerL DumbergerL self-assigned this Apr 10, 2021
@DumbergerL DumbergerL added the enhancement New feature or request label Apr 10, 2021
@DumbergerL
Copy link
Contributor Author

@DumbergerL
Copy link
Contributor Author

DumbergerL commented Jun 28, 2023

Idea for Implementation:

// default session
CTConfig::setApiUrl(...);
CTConfig::authWithCredentials(...);

$myself = PersonRequest::whoami();

// create new session
CTSession::switchSession("person_a_session");

CTConfig::setApiUrl(...);
CTConfig::authWithCredentials(...);

$myselfPersonA = PersonRequest::whoami();

$this->assertNotEquals($myself->getId(), $myselfPersonA->getId());

// switch back to default session
CTSession::switchSession("default");

// get sessions
$sessions = CTSession::getSessions();
// => ["default", "person_a_session"];

DumbergerL added a commit that referenced this issue Jun 28, 2023
DumbergerL added a commit that referenced this issue Jun 28, 2023
DumbergerL added a commit that referenced this issue Jun 28, 2023
feat(ct-session): create ct-session to manage multiple connections #2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant