Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 213 for torrent (0.43 sec)

  1. docs/ko/docs/tutorial/security/get-current-user.md

        ```Python hl_lines="3  10-14"
        {!> ../../../docs_src/security/tutorial002_py310.py!}
        ```
    
    ## `get_current_user` 의존성 생성하기
    
    의존성 `get_current_user`를 만들어 봅시다.
    
    의존성이 하위 의존성을 가질 수 있다는 것을 기억하십니까?
    
    `get_current_user`는 이전에 생성한 것과 동일한 `oauth2_scheme`과 종속성을 갖게 됩니다.
    
    이전에 *경로 작동*에서 직접 수행했던 것과 동일하게 새 종속성 `get_current_user`는 하위 종속성 `oauth2_scheme`에서 `str`로 `token`을 수신합니다.
    
    === "파이썬 3.7 이상"
    
        ```Python hl_lines="25"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  2. cmd/config-current.go

    jiuker <******@****.***> 1713872008 +0800
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 23 11:33:28 GMT 2024
    - 30.7K bytes
    - Viewed (0)
  3. cmd/metacache-walk.go

    	var scanDir func(path string) error
    
    	scanDir = func(current string) error {
    		// Skip forward, if requested...
    		sb := bytebufferpool.Get()
    		defer func() {
    			sb.Reset()
    			bytebufferpool.Put(sb)
    		}()
    
    		forward := ""
    		if len(opts.ForwardTo) > 0 && strings.HasPrefix(opts.ForwardTo, current) {
    			forward = strings.TrimPrefix(opts.ForwardTo, current)
    			// Trim further directories and trailing slash.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  4. tests/test_security_oauth2.py

        return form_data
    
    
    @app.get("/users/me")
    # Here we use string annotations to test them
    def read_current_user(current_user: "User" = Depends(get_current_user)):
        return current_user
    
    
    client = TestClient(app)
    
    
    def test_security_oauth2():
        response = client.get("/users/me", headers={"Authorization": "Bearer footokenbar"})
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  5. tests/test_security_oauth2_optional_description.py

        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
    
    
    @app.get("/users/me")
    def read_users_me(current_user: Optional[User] = Depends(get_current_user)):
    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)
  6. docs/en/docs/tutorial/dependencies/index.md

    ```mermaid
    graph TB
    
    current_user(["current_user"])
    active_user(["active_user"])
    admin_user(["admin_user"])
    paying_user(["paying_user"])
    
    public["/items/public/"]
    private["/items/private/"]
    activate_user["/users/{user_id}/activate"]
    pro_items["/items/pro/"]
    
    current_user --> active_user
    active_user --> admin_user
    active_user --> paying_user
    
    current_user --> public
    active_user --> private
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  7. docs/debugging/xl-meta/main.go

    					b = bytes.TrimFunc(b, func(r rune) bool {
    						return r == '{' || r == '}' || r == '\n' || r == '\r'
    					})
    				}
    
    				toPrint = append(toPrint, fmt.Sprintf("%s%s", b0, string(b)))
    			}
    		}
    		sort.Strings(toPrint)
    		fmt.Printf("{\n%s\n}\n", strings.Join(toPrint, ",\n"))
    
    		if len(combineFiles) > 0 {
    			for k, v := range combineFiles {
    				if err := combine(v, k); err != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 24 17:56:22 GMT 2024
    - 20.2K bytes
    - Viewed (1)
  8. tests/test_security_oauth2_optional.py

        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
    
    
    @app.get("/users/me")
    def read_users_me(current_user: Optional[User] = Depends(get_current_user)):
    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. common/config/.golangci.yml

        # it's a comma-separated list of prefixes
        local-prefixes: istio.io/
      misspell:
        # Correct spellings using locale preferences for US or UK.
        # Default is to use a neutral variety of English.
        # Setting locale to US will correct the British spelling of 'colour' to 'color'.
        locale: US
        ignore-words:
          - cancelled
      lll:
    Others
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Mon Apr 22 19:22:39 GMT 2024
    - 11K bytes
    - Viewed (0)
  10. cni/pkg/ipset/ipset.go

    // and iptables will be smart enough to pick the correct underlying set (v4 or v6, based on context),
    // reducing the # of rules we need.
    //
    // BUT netlink lib doesn't support adding things to `list:set` types yet, and current tagged release
    // doesn't support creating `list:set` types yet (is in main branch tho).
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 3.9K bytes
    - Viewed (0)
Back to top