- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 562 for bearer (0.07 sec)
-
docs_src/security/tutorial003_py310.py
if not user: raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Invalid authentication credentials", headers={"WWW-Authenticate": "Bearer"}, ) return user async def get_current_active_user(current_user: User = Depends(get_current_user)): if current_user.disabled: raise HTTPException(status_code=400, detail="Inactive user")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 2.4K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/helper/AccessTokenHelperTest.java
public void test_getAccessTokenFromRequest_ok0() { final String token = accessTokenHelper.generateAccessToken(); MockletHttpServletRequest req = getMockRequest(); req.addHeader("Authorization", "Bearer " + token); assertEquals(token, accessTokenHelper.getAccessTokenFromRequest(req)); } public void test_getAccessTokenFromRequest_ok1() { final String token = accessTokenHelper.generateAccessToken();
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:37:57 UTC 2024 - 3.1K bytes - Viewed (0) -
docs/zh/docs/tutorial/security/simple-oauth2.md
```Python hl_lines="58-67 69-72 90" {!../../docs_src/security/tutorial003.py!} ``` /// info | "说明" 此处返回值为 `Bearer` 的响应头 `WWW-Authenticate` 也是规范的一部分。 任何 401**UNAUTHORIZED**HTTP(错误)状态码都应返回 `WWW-Authenticate` 响应头。 本例中,因为使用的是 Bearer Token,该响应头的值应为 `Bearer`。 实际上,忽略这个附加响应头,也不会有什么问题。 之所以在此提供这个附加响应头,是为了符合规范的要求。 说不定什么时候,就有工具用得上它,而且,开发者或用户也可能用得上。 这就是遵循标准的好处…… ///
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.8K bytes - Viewed (0) -
docs_src/security/tutorial003.py
if not user: raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Invalid authentication credentials", headers={"WWW-Authenticate": "Bearer"}, ) return user async def get_current_active_user(current_user: User = Depends(get_current_user)): if current_user.disabled: raise HTTPException(status_code=400, detail="Inactive user")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 2.4K bytes - Viewed (0) -
internal/config/lambda/target/webhook.go
// already present we can blindly use the // authToken as is instead of adding 'Bearer' tokens := strings.Fields(target.args.AuthToken) switch len(tokens) { case 2: req.Header.Set("Authorization", target.args.AuthToken) case 1: req.Header.Set("Authorization", "Bearer "+target.args.AuthToken) } req.Header.Set("Content-Type", "application/json") return target.httpClient.Do(req) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 08 21:39:49 UTC 2024 - 6.7K bytes - Viewed (0) -
docs_src/security/tutorial003_an_py310.py
if not user: raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Invalid authentication credentials", headers={"WWW-Authenticate": "Bearer"}, ) return user async def get_current_active_user( current_user: Annotated[User, Depends(get_current_user)], ): if current_user.disabled:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 2.5K bytes - Viewed (0) -
docs_src/security/tutorial005_py39.py
async def get_current_user( security_scopes: SecurityScopes, token: str = Depends(oauth2_scheme) ): if security_scopes.scopes: authenticate_value = f'Bearer scope="{security_scopes.scope_str}"' else: authenticate_value = "Bearer" credentials_exception = HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Could not validate credentials",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 5.2K bytes - Viewed (0) -
fastapi/security/api_key.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Apr 23 22:29:18 UTC 2024 - 9.1K bytes - Viewed (0) -
docs_src/security/tutorial005_an_py310.py
async def get_current_user( security_scopes: SecurityScopes, token: Annotated[str, Depends(oauth2_scheme)] ): if security_scopes.scopes: authenticate_value = f'Bearer scope="{security_scopes.scope_str}"' else: authenticate_value = "Bearer" credentials_exception = HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Could not validate credentials",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 5.2K bytes - Viewed (0) -
docs_src/security/tutorial005_an_py39.py
async def get_current_user( security_scopes: SecurityScopes, token: Annotated[str, Depends(oauth2_scheme)] ): if security_scopes.scopes: authenticate_value = f'Bearer scope="{security_scopes.scope_str}"' else: authenticate_value = "Bearer" credentials_exception = HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Could not validate credentials",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 5.3K bytes - Viewed (0)