Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 1,134 for Scheme (0.22 sec)

  1. tests/test_security_openid_connect_description.py

    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    oid = OpenIdConnect(
        openIdConnectUrl="/openid", description="OpenIdConnect security scheme"
    )
    
    
    class User(BaseModel):
        username: str
    
    
    def get_current_user(oauth_header: str = Security(oid)):
        user = User(username=oauth_header)
        return user
    
    
    @app.get("/users/me")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  2. helm/minio/templates/_helper_create_policy.txt

    connectToMinio() {
      SCHEME=$1
      ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts
      set -e ; # fail if we can't read the keys.
      ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ;
      set +e ; # The connections to minio are allowed to fail.
      echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ;
      MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ;
    Plain Text
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 21 06:38:06 GMT 2023
    - 2K bytes
    - Viewed (0)
  3. docs_src/security/tutorial002_py310.py

    from fastapi import Depends, FastAPI
    from fastapi.security import OAuth2PasswordBearer
    from pydantic import BaseModel
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    
    class User(BaseModel):
        username: str
        email: str | None = None
        full_name: str | None = None
        disabled: bool | None = None
    
    
    def fake_decode_token(token):
        return User(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 711 bytes
    - Viewed (0)
  4. docs_src/security/tutorial002.py

    from typing import Union
    
    from fastapi import Depends, FastAPI
    from fastapi.security import OAuth2PasswordBearer
    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(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 755 bytes
    - Viewed (0)
  5. docs_src/security/tutorial002_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import Depends, FastAPI
    from fastapi.security import OAuth2PasswordBearer
    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):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 786 bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/HttpUrlJvmTest.kt

          HttpUrl.Builder()
            .scheme("http")
            .username("user")
            .host("host")
            .build()
        assertThat(httpUrl.toString()).isEqualTo("http://user@host/")
        assertThat(httpUrl.toUri().toString()).isEqualTo("http://user@host/")
      }
    
      @Test
      fun toUriUsernameSpecialCharacters() {
        val url =
          HttpUrl.Builder()
            .scheme("http")
            .host("host")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  7. cmd/net.go

    		return "", "", err
    	}
    
    	addr = u.Host
    	scheme = u.Scheme
    
    	// Use the given parameter again if url.Parse()
    	// didn't return any useful result.
    	if addr == "" {
    		addr = hostAddr
    		scheme = "http"
    	}
    
    	// At this point, addr can be one of the following form:
    	//	":9000"
    	//	"localhost:9000"
    	//	"localhost" <- in this case, we check for scheme
    
    	host, port, err := net.SplitHostPort(addr)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 26 15:00:38 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/HttpUrl.kt

        /**
         * @param scheme either "http" or "https".
         */
        fun scheme(scheme: String) =
          apply {
            when {
              scheme.equals("http", ignoreCase = true) -> this.scheme = "http"
              scheme.equals("https", ignoreCase = true) -> this.scheme = "https"
              else -> throw IllegalArgumentException("unexpected scheme: $scheme")
            }
          }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 63.5K bytes
    - Viewed (1)
  9. docs/en/docs/tutorial/security/first-steps.md

    The `oauth2_scheme` variable is an instance of `OAuth2PasswordBearer`, but it is also a "callable".
    
    It could be called as:
    
    ```Python
    oauth2_scheme(some, parameters)
    ```
    
    So, it can be used with `Depends`.
    
    ### Use it
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  10. helm-releases/minio-3.4.3.tgz

    check-sleep-check loop to wait for MinIO service to be available connectToMinio() { SCHEME=$1 ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts set -e ; # fail if we can't read the keys. ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; set +e ; # The connections to minio are allowed to fail. echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; MC_COMMAND="${MC} config host add myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; $MC_COMMAND ; STATUS=$? ; until...
    Others
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Dec 21 20:55:50 GMT 2021
    - 17.7K bytes
    - Viewed (0)
Back to top