Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 45 for OAuth (0.25 sec)

  1. tests/test_security_openid_connect_description.py

    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")
    def read_current_user(current_user: User = Depends(get_current_user)):
        return current_user
    
    
    client = TestClient(app)
    
    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. docs/en/docs/tutorial/security/index.md

    It includes ways to authenticate using a "third party".
    
    That's what all the systems with "login with Facebook, Google, Twitter, GitHub" use underneath.
    
    ### OAuth 1
    
    There was an OAuth 1, which is very different from OAuth2, and more complex, as it included direct specifications on how to encrypt the communication.
    
    It is not very popular or used nowadays.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jun 24 14:47:15 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  3. tests/test_security_api_key_query_description.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    api_key = APIKeyQuery(name="key", description="API Key Query")
    
    
    class User(BaseModel):
        username: str
    
    
    def get_current_user(oauth_header: str = Security(api_key)):
        user = User(username=oauth_header)
        return user
    
    
    @app.get("/users/me")
    def read_current_user(current_user: User = Depends(get_current_user)):
        return current_user
    
    
    client = TestClient(app)
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2K bytes
    - Viewed (0)
  4. tests/test_security_api_key_header.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    api_key = APIKeyHeader(name="key")
    
    
    class User(BaseModel):
        username: str
    
    
    def get_current_user(oauth_header: str = Security(api_key)):
        user = User(username=oauth_header)
        return user
    
    
    @app.get("/users/me")
    def read_current_user(current_user: User = Depends(get_current_user)):
        return current_user
    
    
    client = TestClient(app)
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  5. tests/test_security_api_key_cookie.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    api_key = APIKeyCookie(name="key")
    
    
    class User(BaseModel):
        username: str
    
    
    def get_current_user(oauth_header: str = Security(api_key)):
        user = User(username=oauth_header)
        return user
    
    
    @app.get("/users/me")
    def read_current_user(current_user: User = Depends(get_current_user)):
        return current_user
    
    
    def test_security_api_key():
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  6. docs/sts/web-identity.md

    MINIO_IDENTITY_OPENID_CLIENT_ID="minio-client-app"
    MINIO_IDENTITY_OPENID_CLIENT_SECRET="minio-client-app-secret"
    MINIO_IDENTITY_OPENID_SCOPES="openid,groups"
    MINIO_IDENTITY_OPENID_REDIRECT_URI="http://127.0.0.1:10000/oauth_callback"
    MINIO_IDENTITY_OPENID_ROLE_POLICY="consoleAdmin"
    
    MINIO_IDENTITY_OPENID_DISPLAY_NAME_APP2="another oidc"
    MINIO_IDENTITY_OPENID_CONFIG_URL_APP2="http://anotheroidc.com/.well-known/openid-configuration"
    Plain Text
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  7. docs/zh/docs/tutorial/security/index.md

    ## OAuth2
    
    OAuth2是一个规范,它定义了几种处理身份认证和授权的方法。
    
    它是一个相当广泛的规范,涵盖了一些复杂的使用场景。
    
    它包括了使用「第三方」进行身份认证的方法。
    
    这就是所有带有「使用 Facebook,Google,Twitter,GitHub 登录」的系统背后所使用的机制。
    
    ### OAuth 1
    
    有一个 OAuth 1,它与 OAuth2 完全不同,并且更为复杂,因为它直接包含了有关如何加密通信的规范。
    
    如今它已经不是很流行,没有被广泛使用了。
    
    OAuth2 没有指定如何加密通信,它期望你为应用程序使用 HTTPS 进行通信。
    
    !!! tip
        在有关**部署**的章节中,你将了解如何使用 Traefik 和 Let's Encrypt 免费设置 HTTPS。
    
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jun 24 14:47:15 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  8. tests/test_security_oauth2_optional.py

            }
        },
        auto_error=False,
    )
    
    
    class User(BaseModel):
        username: str
    
    
    def get_current_user(oauth_header: Optional[str] = Security(reusable_oauth2)):
        if oauth_header is None:
            return None
        user = User(username=oauth_header)
        return user
    
    
    @app.post("/login")
    def login(form_data: OAuth2PasswordRequestFormStrict = Depends()):
        return form_data
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  9. tests/test_security_oauth2_optional_description.py

        description="OAuth2 security scheme",
        auto_error=False,
    )
    
    
    class User(BaseModel):
        username: str
    
    
    def get_current_user(oauth_header: Optional[str] = Security(reusable_oauth2)):
        if oauth_header is None:
            return None
        user = User(username=oauth_header)
        return user
    
    
    @app.post("/login")
    def login(form_data: OAuth2PasswordRequestFormStrict = Depends()):
        return form_data
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  10. docs/pt/docs/tutorial/security/index.md

    Ela inclui uma forma para autenticação usando “third party”/aplicações de terceiros.
    
    Isso é o que todos os sistemas com “Login with Facebook, Google, Twitter, GitHub” usam por baixo.
    
    ### OAuth 1
    
    Havia um OAuth 1, que é bem diferente do OAuth2, e mais complexo, isso incluía diretamente as especificações de como criptografar a comunicação.
    
    Não é muito popular ou usado nos dias atuais.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jun 24 14:47:15 GMT 2023
    - 4.8K bytes
    - Viewed (0)
Back to top