You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
storage: add a method to create an OAuth 2.0 session for a client credentials grant
This commit is contained in:
@@ -244,7 +244,7 @@ pub(crate) async fn complete(
|
||||
// All good, let's start the session
|
||||
let session = repo
|
||||
.oauth2_session()
|
||||
.add(rng, clock, client, browser_session, grant.scope.clone())
|
||||
.add_from_browser_session(rng, clock, client, browser_session, grant.scope.clone())
|
||||
.await?;
|
||||
|
||||
let grant = repo
|
||||
|
||||
@@ -443,7 +443,7 @@ mod tests {
|
||||
|
||||
let session = repo
|
||||
.oauth2_session()
|
||||
.add(
|
||||
.add_from_browser_session(
|
||||
&mut state.rng(),
|
||||
&state.clock,
|
||||
&client,
|
||||
|
||||
@@ -302,7 +302,7 @@ mod tests {
|
||||
|
||||
let session = repo
|
||||
.oauth2_session()
|
||||
.add(
|
||||
.add_from_browser_session(
|
||||
&mut state.rng(),
|
||||
&state.clock,
|
||||
&client,
|
||||
@@ -369,7 +369,7 @@ mod tests {
|
||||
let mut repo = state.repository().await.unwrap();
|
||||
let session = repo
|
||||
.oauth2_session()
|
||||
.add(
|
||||
.add_from_browser_session(
|
||||
&mut state.rng(),
|
||||
&state.clock,
|
||||
&client,
|
||||
|
||||
@@ -506,7 +506,7 @@ mod tests {
|
||||
|
||||
let session = repo
|
||||
.oauth2_session()
|
||||
.add(
|
||||
.add_from_browser_session(
|
||||
&mut state.rng(),
|
||||
&state.clock,
|
||||
&client,
|
||||
@@ -606,7 +606,7 @@ mod tests {
|
||||
|
||||
let session = repo
|
||||
.oauth2_session()
|
||||
.add(
|
||||
.add_from_browser_session(
|
||||
&mut state.rng(),
|
||||
&state.clock,
|
||||
&client,
|
||||
@@ -691,7 +691,7 @@ mod tests {
|
||||
// Get a token pair
|
||||
let session = repo
|
||||
.oauth2_session()
|
||||
.add(
|
||||
.add_from_browser_session(
|
||||
&mut state.rng(),
|
||||
&state.clock,
|
||||
&client,
|
||||
|
||||
Reference in New Issue
Block a user