- Sort Score
- Num 10 results
- Language All
Results 61 - 70 of 620 for mytoken (0.12 seconds)
-
tests/test_security_oauth2_authorization_code_bearer_description.py
app = FastAPI() oauth2_scheme = OAuth2AuthorizationCodeBearer( authorizationUrl="authorize", tokenUrl="token", description="OAuth2 Code Bearer", auto_error=True, ) @app.get("/items/") async def read_items(token: Optional[str] = Security(oauth2_scheme)): return {"token": token} client = TestClient(app) def test_no_token(): response = client.get("/items")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 2.4K bytes - Click Count (0) -
docs_src/security/tutorial002_py39.py
from pydantic import BaseModel app = FastAPI() oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") class User(BaseModel): username: str email: Union[str, None] = None full_name: Union[str, None] = None disabled: Union[bool, None] = None def fake_decode_token(token): return User( username=token + "fakedecoded", email="******@****.***", full_name="John Doe" )
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 755 bytes - Click Count (0) -
src/test/java/jcifs/pac/kerberos/KerberosAuthDataTest.java
} /** * Test parsing of {@link KerberosConstants#AUTH_DATA_PAC} with an invalid token. * Expects a {@link PACDecodingException} to be thrown. */ @Test void testParseAuthDataPacWithInvalidToken() { // GIVEN an invalid token for AUTH_DATA_PAC byte[] invalidToken = "invalid-pac-token".getBytes(); // WHEN parsing the auth data // THEN a PACDecodingException should be thrownCreated: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 2.7K bytes - Click Count (0) -
docs/iam/identity-manager-plugin.go
}, }, } func mainHandler(w http.ResponseWriter, r *http.Request) { token := r.FormValue("token") if token == "" { writeErrorResponse(w, errors.New("token parameter not given")) return } rsp, ok := tokens[token] if !ok { w.WriteHeader(http.StatusForbidden) return } fmt.Printf("Allowed for token: %s user: %s\n", token, rsp.User) w.WriteHeader(http.StatusOK) json.NewEncoder(w).Encode(rsp)
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Wed May 01 21:31:13 GMT 2024 - 2.1K bytes - Click Count (0) -
docs_src/security/tutorial004_an_py39.py
return encoded_jwt async def get_current_user(token: Annotated[str, Depends(oauth2_scheme)]): credentials_exception = HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Could not validate credentials", headers={"WWW-Authenticate": "Bearer"}, ) try: payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM]) username = payload.get("sub")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Sep 29 02:57:38 GMT 2025 - 4.2K bytes - Click Count (0) -
src/main/java/jcifs/pac/kerberos/KerberosPacAuthData.java
/** * Constructs KerberosPacAuthData from token bytes. * * @param token the PAC token bytes * @param keys map of Kerberos keys indexed by key type * @throws PACDecodingException if PAC decoding fails */ public KerberosPacAuthData(byte[] token, Map<Integer, KerberosKey> keys) throws PACDecodingException { this.pac = new Pac(token, keys); } /** * Returns the PAC object.Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 1.6K bytes - Click Count (0) -
docs_src/security/tutorial005_an_py310.py
): if current_user.disabled: raise HTTPException(status_code=400, detail="Inactive user") return current_user @app.post("/token") async def login_for_access_token( form_data: Annotated[OAuth2PasswordRequestForm, Depends()], ) -> Token: user = authenticate_user(fake_users_db, form_data.username, form_data.password) if not user:Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Sep 29 02:57:38 GMT 2025 - 5.3K bytes - Click Count (0) -
docs_src/security/tutorial005_an_py39.py
): if current_user.disabled: raise HTTPException(status_code=400, detail="Inactive user") return current_user @app.post("/token") async def login_for_access_token( form_data: Annotated[OAuth2PasswordRequestForm, Depends()], ) -> Token: user = authenticate_user(fake_users_db, form_data.username, form_data.password) if not user:Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Sep 29 02:57:38 GMT 2025 - 5.3K bytes - Click Count (0) -
tests/test_tutorial/test_security/test_tutorial005.py
}, "Token": { "title": "Token", "required": ["access_token", "token_type"], "type": "object", "properties": { "access_token": {"title": "Access Token", "type": "string"}, "token_type": {"title": "Token Type", "type": "string"}, },Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 15.8K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/app/web/admin/dict/kuromoji/CreateForm.java
@ValidateTypeFailure public Integer crudMode; /** Token (word) to be added to the dictionary */ @Required @Size(max = 1000) public String token; /** Segmentation information for the token */ @Required @Size(max = 1000) public String segmentation; /** Reading (pronunciation) of the token in katakana */ @Required @Size(max = 1000) public String reading;Created: Sat Dec 20 09:19:18 GMT 2025 - Last Modified: Thu Jul 17 08:28:31 GMT 2025 - 2K bytes - Click Count (0)