Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 91 - 100 of 645 for usernames (0.06 seconds)

  1. tests/test_security_openid_connect_optional.py

    app = FastAPI()
    
    oid = OpenIdConnect(openIdConnectUrl="/openid", auto_error=False)
    
    
    class User(BaseModel):
        username: str
    
    
    def get_current_user(oauth_header: str | None = Security(oid)):
        if oauth_header is None:
            return None
        user = User(username=oauth_header)
        return user
    
    
    @app.get("/users/me")
    def read_current_user(current_user: User | None = Depends(get_current_user)):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 2.6K bytes
    - Click Count (0)
  2. docs/zh/docs/advanced/security/http-basic-auth.md

    为了解决这个问题,我们首先将 `username` 和 `password` 转换为使用 UTF-8 编码的 `bytes` 。
    
    然后我们可以使用 `secrets.compare_digest()` 来确保 `credentials.username` 是 `"stanleyjobson"`,且 `credentials.password` 是`"swordfish"`。
    
    {* ../../docs_src/security/tutorial007_an_py310.py hl[1,12:24] *}
    
    这类似于:
    
    ```Python
    if not (credentials.username == "stanleyjobson") or not (credentials.password == "swordfish"):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 4.4K bytes
    - Click Count (0)
  3. docs_src/security/tutorial002_py310.py

    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(
            username=token + "fakedecoded", email="******@****.***", full_name="John Doe"
        )
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 711 bytes
    - Click Count (0)
  4. src/test/java/org/codelibs/fess/sso/SsoAuthenticatorTest.java

            private final String username;
            private final String password;
    
            public TestLoginCredential(String username, String password) {
                this.username = username;
                this.password = password;
            }
    
            public String getUsername() {
                return username;
            }
    
            public String getPassword() {
                return password;
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Fri Mar 13 23:01:26 GMT 2026
    - 11.2K bytes
    - Click Count (1)
  5. docs_src/security/tutorial002_an_py310.py

    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(
            username=token + "fakedecoded", email="******@****.***", full_name="John Doe"
        )
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 761 bytes
    - Click Count (0)
  6. src/main/webapp/WEB-INF/view/admin/webauth/admin_webauth_edit.jsp

                                        <label for="username" class="col-sm-3 text-sm-right col-form-label"><la:message
                                                key="labels.webauth_username"/></label>
                                        <div class="col-sm-9">
                                            <la:errors property="username"/>
                                            <la:text styleId="username" property="username" styleClass="form-control"/>
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Mon Feb 23 08:03:44 GMT 2026
    - 8.5K bytes
    - Click Count (0)
  7. docs_src/request_forms/tutorial001_py310.py

    from fastapi import FastAPI, Form
    
    app = FastAPI()
    
    
    @app.post("/login/")
    async def login(username: str = Form(), password: str = Form()):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 173 bytes
    - Click Count (0)
  8. docs/ko/docs/tutorial/security/simple-oauth2.md

    # 패스워드와 Bearer를 이용한 간단한 OAuth2 { #simple-oauth2-with-password-and-bearer }
    
    이제 이전 장에서 빌드하고 누락된 부분을 추가하여 완전한 보안 흐름을 갖도록 하겠습니다.
    
    ## `username`와 `password` 얻기 { #get-the-username-and-password }
    
    **FastAPI** 보안 유틸리티를 사용하여 `username` 및 `password`를 가져올 것입니다.
    
    OAuth2는 (우리가 사용하고 있는) "패스워드 플로우"을 사용할 때 클라이언트/유저가 `username` 및 `password` 필드를 폼 데이터로 보내야 함을 지정합니다.
    
    그리고 사양에는 필드의 이름을 그렇게 지정해야 한다고 나와 있습니다. 따라서 `user-name` 또는 `email`은 작동하지 않습니다.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 11.1K bytes
    - Click Count (0)
  9. src/main/java/org/codelibs/fess/app/web/admin/reqheader/AdminReqheaderAction.java

         * @param form the form containing the request header data
         * @param username the username of the user performing the operation
         * @param currentTime the current timestamp
         * @return optional entity containing the request header data, or empty if creation fails
         */
        public static OptionalEntity<RequestHeader> getEntity(final CreateForm form, final String username, final long currentTime) {
            switch (form.crudMode) {
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Thu Nov 20 13:56:35 GMT 2025
    - 17.7K bytes
    - Click Count (0)
  10. src/main/java/org/codelibs/fess/app/web/admin/fileauth/AdminFileauthAction.java

         *
         * @param form the create form
         * @param username the current username
         * @param currentTime the current time
         * @return optional file authentication entity
         */
        public static OptionalEntity<FileAuthentication> getEntity(final CreateForm form, final String username, final long currentTime) {
            switch (form.crudMode) {
            case CrudMode.CREATE:
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Thu Nov 20 13:56:35 GMT 2025
    - 18.7K bytes
    - Click Count (0)
Back to Top