- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 602 for bearer (0.07 seconds)
-
docs/en/docs/tutorial/security/first-steps.md
* But it needs authentication for that specific endpoint. * So, to authenticate with our API, it sends a header `Authorization` with a value of `Bearer ` plus the token. * If the token contains `foobar`, the content of the `Authorization` header would be: `Bearer foobar`. ## **FastAPI**'s `OAuth2PasswordBearer` { #fastapis-oauth2passwordbearer }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Mar 07 09:29:03 GMT 2026 - 8.3K bytes - Click Count (0) -
docs/en/docs/tutorial/security/simple-oauth2.md
/// info The additional header `WWW-Authenticate` with value `Bearer` we are returning here is also part of the spec. Any HTTP (error) status code 401 "UNAUTHORIZED" is supposed to also return a `WWW-Authenticate` header. In the case of bearer tokens (our case), the value of that header should be `Bearer`. You can actually skip that extra header and it would still work.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 9.4K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/helper/AccessTokenHelper.java
*/ public class AccessTokenHelper { /** * Default constructor. */ public AccessTokenHelper() { // nothing } /** * The bearer string. */ protected static final String BEARER = "Bearer"; /** * The random instance. */ protected Random random = new SecureRandom(); /** * Generate the access token. * @return The access token.Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Thu Jul 17 08:28:31 GMT 2025 - 2.6K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/security/simple-oauth2.md
因此,在端點中,只有在使用者存在、已正確驗證且為啟用狀態時,我們才會取得使用者: {* ../../docs_src/security/tutorial003_an_py310.py hl[58:66,69:74,94] *} /// info 這裡我們一併回傳值為 `Bearer` 的額外標頭 `WWW-Authenticate`,這也是規範的一部分。 任何 HTTP(錯誤)狀態碼 401「UNAUTHORIZED」都應該同時回傳 `WWW-Authenticate` 標頭。 在 bearer tokens(我們的情況)下,該標頭的值應該是 `Bearer`。 其實你可以省略這個額外標頭,功能仍會正常。 但此處加上它是為了遵循規範。 同時也可能有工具會期待並使用它(現在或未來),而這可能對你或你的使用者有幫助,現在或未來皆然。 這就是標準的好處... ///Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 9.1K bytes - Click Count (0) -
tests/test_dependency_paramless.py
response = client.get("/get-credentials", headers={"authorization": "Bearer token"}) assert response.status_code == 200, response.text assert response.json() == {"token": "token", "scopes": ["a", "b"]} def test_parameterless_with_scopes(): response = client.get( "/parameterless-with-scopes", headers={"authorization": "Bearer token"} ) assert response.status_code == 200, response.text
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2.3K bytes - Click Count (0) -
docs/ko/docs/tutorial/security/first-steps.md
* 그래서 우리 API에 인증하기 위해 `Authorization` 헤더를, 값은 `Bearer `에 token을 더한 형태로 보냅니다. * token에 `foobar`가 들어 있다면 `Authorization` 헤더의 내용은 `Bearer foobar`가 됩니다. ## **FastAPI**의 `OAuth2PasswordBearer` { #fastapis-oauth2passwordbearer } **FastAPI**는 이런 보안 기능을 구현하기 위해, 서로 다른 추상화 수준에서 여러 도구를 제공합니다. 이 예제에서는 **OAuth2**의 **Password** 플로우와 **Bearer** token을 사용합니다. 이를 위해 `OAuth2PasswordBearer` 클래스를 사용합니다. /// info | 정보Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 9.6K bytes - Click Count (0) -
docs_src/security/tutorial004_py310.py
headers={"WWW-Authenticate": "Bearer"}, ) access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES) access_token = create_access_token( data={"sub": user.username}, expires_delta=access_token_expires ) return Token(access_token=access_token, token_type="bearer") @app.get("/users/me/")Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 18:10:35 GMT 2026 - 4.1K bytes - Click Count (0) -
docs_src/security/tutorial004_an_py310.py
headers={"WWW-Authenticate": "Bearer"}, ) access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES) access_token = create_access_token( data={"sub": user.username}, expires_delta=access_token_expires ) return Token(access_token=access_token, token_type="bearer") @app.get("/users/me/") async def read_users_me(Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 18:10:35 GMT 2026 - 4.2K bytes - Click Count (0) -
docs_src/security/tutorial003_py310.py
user = fake_decode_token(token) if not user: raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Not authenticated", 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")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 2.4K bytes - Click Count (0) -
docs/zh/docs/tutorial/security/simple-oauth2.md
因此,在端点中,只有当用户存在、通过身份验证、且状态为激活时,才能获得该用户: {* ../../docs_src/security/tutorial003_an_py310.py hl[58:66,69:74,94] *} /// info | 信息 此处返回值为 `Bearer` 的响应头 `WWW-Authenticate` 也是规范的一部分。 任何 401“UNAUTHORIZED”HTTP(错误)状态码都应返回 `WWW-Authenticate` 响应头。 本例中,因为使用的是 Bearer Token,该响应头的值应为 `Bearer`。 实际上,忽略这个附加响应头,也不会有什么问题。 之所以在此提供这个附加响应头,是为了符合规范的要求。 说不定什么时候,就有工具用得上它,而且,开发者或用户也可能用得上。 这就是遵循标准的好处... ///Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 9K bytes - Click Count (0)