- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for get_access_token (0.2 sec)
-
tests/test_tutorial/test_security/test_tutorial005_an_py39.py
from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.security.tutorial005_an_py39 import app client = TestClient(app) return client def get_access_token( *, username="johndoe", password="secret", scope=None, client: TestClient ): data = {"username": username, "password": password} if scope: data["scope"] = scope
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005.py
def test_read_items(): access_token = get_access_token(scope="me items") response = client.get( "/users/me/items/", headers={"Authorization": f"Bearer {access_token}"} ) assert response.status_code == 200, response.text assert response.json() == [{"item_id": "Foo", "owner": "johndoe"}] def test_read_system_status(): access_token = get_access_token() response = client.get(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 15.4K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an_py310.py
from ...utils import needs_py310 @pytest.fixture(name="client") def get_client(): from docs_src.security.tutorial005_an_py310 import app client = TestClient(app) return client def get_access_token( *, username="johndoe", password="secret", scope=None, client: TestClient ): data = {"username": username, "password": password} if scope: data["scope"] = scope
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an.py
def test_read_items(): access_token = get_access_token(scope="me items") response = client.get( "/users/me/items/", headers={"Authorization": f"Bearer {access_token}"} ) assert response.status_code == 200, response.text assert response.json() == [{"item_id": "Foo", "owner": "johndoe"}] def test_read_system_status(): access_token = get_access_token() response = client.get(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 15.4K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_py310.py
from ...utils import needs_py310 @pytest.fixture(name="client") def get_client(): from docs_src.security.tutorial005_py310 import app client = TestClient(app) return client def get_access_token( *, username="johndoe", password="secret", scope=None, client: TestClient ): data = {"username": username, "password": password} if scope: data["scope"] = scope
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_py39.py
from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.security.tutorial005_py39 import app client = TestClient(app) return client def get_access_token( *, username="johndoe", password="secret", scope=None, client: TestClient ): data = {"username": username, "password": password} if scope: data["scope"] = scope
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/admin/accesstoken/AdminAccesstokenAction.java
return ComponentUtil.getComponent(AccessTokenService.class).getAccessToken(((EditForm) form).id); } break; default: break; } return OptionalEntity.empty(); } public static OptionalEntity<AccessToken> getAccessToken(final CreateForm form) { final SystemHelper systemHelper = ComponentUtil.getSystemHelper();
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 14.7K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/accesstoken/ApiAdminAccesstokenAction.java
*/ package org.codelibs.fess.app.web.api.admin.accesstoken; import static org.codelibs.core.stream.StreamUtil.stream; import static org.codelibs.fess.app.web.admin.accesstoken.AdminAccesstokenAction.getAccessToken; import java.util.List; import java.util.stream.Collectors; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.codelibs.core.lang.StringUtil;
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:37:57 UTC 2024 - 7K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/sso/aad/AzureAdAuthenticator.java
if (authResponse instanceof final AuthenticationSuccessResponse oidcResponse) { validateAuthRespMatchesCodeFlow(oidcResponse); final AuthenticationResult authData = getAccessToken(oidcResponse.getAuthorizationCode(), getReplyUrl(request)); validateNonce(stateData, authData); return new AzureAdCredential(authData); }
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 28.2K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/base/login/AzureAdCredential.java
final AzureAdAuthenticator authenticator = ComponentUtil.getComponent(AzureAdAuthenticator.class); final String refreshToken = authResult.getRefreshToken(); authResult = authenticator.getAccessToken(refreshToken); authenticator.updateMemberOf(this); permissions = null; return true; } public AuthenticationResult getAuthenticationResult() {
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:37:57 UTC 2024 - 5.1K bytes - Viewed (0)