Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 1,040 for userTime (0.11 sec)

  1. docs_src/security/tutorial003_an_py39.py

    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
    
    
    class UserInDB(User):
        hashed_password: str
    
    
    def get_user(db, username: str):
        if username in db:
            user_dict = db[username]
            return UserInDB(**user_dict)
    
    
    def fake_decode_token(token):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  2. plugin/pkg/admission/gc/gc_admission_test.go

    )
    
    type fakeAuthorizer struct{}
    
    func (fakeAuthorizer) Authorize(ctx context.Context, a authorizer.Attributes) (authorizer.Decision, string, error) {
    	username := a.GetUser().GetName()
    
    	if username == "non-deleter" {
    		if a.GetVerb() == "delete" {
    			return authorizer.DecisionNoOpinion, "", nil
    		}
    		if a.GetVerb() == "update" && a.GetSubresource() == "finalizers" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 21:28:42 UTC 2024
    - 24.5K bytes
    - Viewed (0)
  3. docs_src/security/tutorial007_an_py39.py

                status_code=status.HTTP_401_UNAUTHORIZED,
                detail="Incorrect username or password",
                headers={"WWW-Authenticate": "Basic"},
            )
        return credentials.username
    
    
    @app.get("/users/me")
    def read_current_user(username: Annotated[str, Depends(get_current_username)]):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_response_model/test_tutorial003.py

                        "required": IsOneOf(
                            ["username", "email", "full_name"],
                            # TODO: remove when deprecating Pydantic v1
                            ["username", "email"],
                        ),
                        "type": "object",
                        "properties": {
                            "username": {"title": "Username", "type": "string"},
                            "email": {
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Aug 04 20:47:07 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/security/http-basic-auth.md

    In HTTP Basic Auth, the application expects a header that contains a username and a password.
    
    If it doesn't receive it, it returns an HTTP 401 "Unauthorized" error.
    
    And returns a header `WWW-Authenticate` with a value of `Basic`, and an optional `realm` parameter.
    
    That tells the browser to show the integrated prompt for a username and password.
    
    Then, when you type that username and password, the browser sends them in the header automatically.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Jan 11 14:33:05 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_request_forms/test_tutorial001.py

    
    def test_post_body_form(client: TestClient):
        response = client.post("/login/", data={"username": "Foo", "password": "secret"})
        assert response.status_code == 200
        assert response.json() == {"username": "Foo"}
    
    
    def test_post_body_form_no_password(client: TestClient):
        response = client.post("/login/", data={"username": "Foo"})
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_request_forms/test_tutorial001_an.py

    
    def test_post_body_form(client: TestClient):
        response = client.post("/login/", data={"username": "Foo", "password": "secret"})
        assert response.status_code == 200
        assert response.json() == {"username": "Foo"}
    
    
    def test_post_body_form_no_password(client: TestClient):
        response = client.post("/login/", data={"username": "Foo"})
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_request_forms/test_tutorial001_an_py39.py

    @needs_py39
    def test_post_body_form(client: TestClient):
        response = client.post("/login/", data={"username": "Foo", "password": "secret"})
        assert response.status_code == 200
        assert response.json() == {"username": "Foo"}
    
    
    @needs_py39
    def test_post_body_form_no_password(client: TestClient):
        response = client.post("/login/", data={"username": "Foo"})
        assert response.status_code == 422
        assert response.json() == IsDict(
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb1/smb1/NtlmPasswordAuthentication.java

                    domain = username.substring(ci + 1);
                    username = username.substring(0, ci);
                } else {
                    ci = username.indexOf('\\');
                    if (ci > 0) {
                        domain = username.substring(0, ci);
                        username = username.substring(ci + 1);
                    }
                }
            }
    
            this.domain = domain;
            this.username = username;
    Registered: Wed Jun 12 15:45:55 UTC 2024
    - Last Modified: Fri Mar 22 21:10:40 UTC 2019
    - 22.5K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_response_model/test_tutorial003_01_py310.py

                        "required": IsOneOf(
                            ["username", "email", "full_name"],
                            # TODO: remove when deprecating Pydantic v1
                            ["username", "email"],
                        ),
                        "type": "object",
                        "properties": {
                            "username": {"title": "Username", "type": "string"},
                            "email": {
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Aug 04 20:47:07 UTC 2023
    - 5.8K bytes
    - Viewed (0)
Back to top