Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 327 for learner (0.23 sec)

  1. 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:
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  2. 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")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 2.4K bytes
    - Viewed (0)
  3. docs/pt/docs/tutorial/security/first-steps.md

    		* Mas precisa de autenticação para aquele endpoint em específico.
    		* Então, para autenticar com nossa API, ele manda um header de `Autorização` com o valor `Bearer` mais o token.
    		* Se o token contém `foobar`, o conteúdo do header de `Autorização` será: `Bearer foobar`.
    
    ## **FastAPI**'s `OAuth2PasswordBearer`
    
    **FastAPI** fornece várias ferramentas, em diferentes níveis de abstração, para implementar esses recursos de segurança.
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/hash/MacHashFunctionTest.java

        byte[] key = fillByteArray(80, 0xaa);
        String data = "Test Using Larger Than Block-Size Key - Hash Key First";
    
        checkSha1("aa4ae5e15272d00e95705637ce8a3b55ed402112", key, data);
      }
    
      public void testRfc2202_hmacSha1_case7() {
        byte[] key = fillByteArray(80, 0xaa);
        String data = "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data";
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.8K bytes
    - Viewed (0)
  5. fastapi/security/oauth2.py

            return authorization
    
    
    class OAuth2PasswordBearer(OAuth2):
        """
        OAuth2 flow for authentication using a bearer token obtained with a password.
        An instance of it would be used as a dependency.
    
        Read more about it in the
        [FastAPI docs for Simple OAuth2 with Password and Bearer](https://fastapi.tiangolo.com/tutorial/security/simple-oauth2/).
        """
    
        def __init__(
            self,
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  6. fastapi/security/api_key.py

                    It is also useful when you want to have authentication that can be
                    provided in one of multiple optional ways (for example, in a query
                    parameter or in an HTTP Bearer token).
                    """
                ),
            ] = True,
        ):
            self.model: APIKey = APIKey(
                **{"in": APIKeyIn.query},  # type: ignore[arg-type]
                name=name,
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  7. docs/metrics/prometheus/README.md

    ##### Cluster
    
    ```yaml
    scrape_configs:
    - job_name: minio-job
      bearer_token: <secret>
      metrics_path: /minio/v2/metrics/cluster
      scheme: http
      static_configs:
      - targets: ['localhost:9000']
    ```
    
    ##### Bucket centric
    
    ```yaml
    - job_name: minio-job-bucket
      bearer_token: <secret>
      metrics_path: /minio/v2/metrics/bucket
      scheme: http
      static_configs:
    Plain Text
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 12 15:49:30 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  8. internal/config/lambda/target/webhook.go

    	// <Key> <Token> like format, if this is
    	// 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")
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Nov 17 20:02:26 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/hash/MacHashFunctionTest.java

        byte[] key = fillByteArray(80, 0xaa);
        String data = "Test Using Larger Than Block-Size Key - Hash Key First";
    
        checkSha1("aa4ae5e15272d00e95705637ce8a3b55ed402112", key, data);
      }
    
      public void testRfc2202_hmacSha1_case7() {
        byte[] key = fillByteArray(80, 0xaa);
        String data = "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data";
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.8K bytes
    - Viewed (0)
  10. docs_src/security/tutorial004_an_py39.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/", response_model=User)
    async def read_users_me(
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4.1K bytes
    - Viewed (0)
Back to top