Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 692 for Scopes (0.12 sec)

  1. docs/sts/web-identity.go

    		"response_mode": {"form_post"},
    		"client_id":     {c.ClientID},
    	}
    	if c.RedirectURL != "" {
    		v.Set("redirect_uri", c.RedirectURL)
    	}
    	if len(c.Scopes) > 0 {
    		v.Set("scope", strings.Join(c.Scopes, " "))
    	}
    	v.Set("state", state)
    	v.Set("nonce", state)
    	if strings.Contains(c.Endpoint.AuthURL, "?") {
    		buf.WriteByte('&')
    	} else {
    		buf.WriteByte('?')
    	}
    	buf.WriteString(v.Encode())
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri May 19 09:13:33 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  2. internal/config/identity/openid/openid.go

    		}
    
    		if scopeList := getCfgVal(Scopes); scopeList != "" {
    			var scopes []string
    			for scope := range strings.SplitSeq(scopeList, ",") {
    				scope = strings.TrimSpace(scope)
    				if scope == "" {
    					return c, config.Errorf("empty scope value is not allowed '%s', please refer to our documentation", scopeList)
    				}
    				scopes = append(scopes, scope)
    			}
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 17.3K bytes
    - Viewed (0)
  3. fastapi/dependencies/models.py

        path: Optional[str] = None
        scope: Union[Literal["function", "request"], None] = None
    
        @cached_property
        def oauth_scopes(self) -> list[str]:
            scopes = self.parent_oauth_scopes.copy() if self.parent_oauth_scopes else []
            # This doesn't use a set to preserve order, just in case
            for scope in self.own_oauth_scopes or []:
                if scope not in scopes:
                    scopes.append(scope)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  4. impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java

            List<String> scopes = new ArrayList<>(2);
            if (scopeToCollect != null && !scopeToCollect.isEmpty()) {
                scopes.add(scopeToCollect);
            }
            if (scopeToResolve != null && !scopeToResolve.isEmpty()) {
                scopes.add(scopeToResolve);
            }
    
            if (scopes.isEmpty()) {
                return null;
            } else {
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Thu Jun 12 14:55:55 UTC 2025
    - 21K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/security/oauth2-jwt.md

    /// note | 笔记
    
    注意,请求中 `Authorization` 响应头的值以 `Bearer` 开头。
    
    ///
    
    ## `scopes` 高级用法
    
    OAuth2 支持**`scopes`**(作用域)。
    
    **`scopes`**为 JWT 令牌添加指定权限。
    
    让持有令牌的用户或第三方在指定限制条件下与 API 交互。
    
    **高级用户指南**中将介绍如何使用 `scopes`,及如何把 `scopes` 集成至 **FastAPI**。
    
    ## 小结
    
    至此,您可以使用 OAuth2 和 JWT 等标准配置安全的 **FastAPI** 应用。
    
    几乎在所有框架中,处理安全问题很快都会变得非常复杂。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  6. tests/test_dependency_yield_scope_websockets.py

    
    def test_broken_scope() -> None:
        with pytest.raises(
            FastAPIError,
            match='The dependency "get_named_func_session" has a scope of "request", it cannot depend on dependencies with scope "function"',
        ):
    
            @app.websocket("/broken-scope")
            async def get_broken(
                websocket: WebSocket, sessions: BrokenSessionsDep
            ) -> Any:  # pragma: no cover
                pass
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 6K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/security/oauth2-jwt.md

    <img src="/img/tutorial/security/image10.png">
    
    /// note
    
    Notice the header `Authorization`, with a value that starts with `Bearer `.
    
    ///
    
    ## Advanced usage with `scopes` { #advanced-usage-with-scopes }
    
    OAuth2 has the notion of "scopes".
    
    You can use them to add a specific set of permissions to a JWT token.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Sep 29 02:57:38 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  8. tests/test_security_oauth2_authorization_code_bearer_scopes_openapi_simple.py

        authorizationUrl="api/oauth/authorize",
        tokenUrl="/api/oauth/token",
        scopes={"read": "Read access", "write": "Write access"},
    )
    
    
    async def get_token(token: Annotated[str, Depends(oauth2_scheme)]) -> str:
        return token
    
    
    app = FastAPI(dependencies=[Depends(get_token)])
    
    
    @app.get("/admin", dependencies=[Security(get_token, scopes=["read", "write"])])
    async def read_admin():
        return {"message": "Admin Access"}
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 2.6K bytes
    - Viewed (0)
  9. docs/en/docs/reference/security/index.md

    # Security Tools
    
    When you need to declare dependencies with OAuth2 scopes you use `Security()`.
    
    But you still need to define what is the dependable, the callable that you pass as a parameter to `Depends()` or `Security()`.
    
    There are multiple tools that you can use to create those dependables, and they get integrated into OpenAPI so they are shown in the automatic docs UI, they can be used by automatically generated clients and SDKs, etc.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  10. tests/test_dependency_yield_scope.py

        return StreamingResponse(iter_data())
    
    
    app.include_router(
        prefix="/router-scope-function",
        router=router,
        dependencies=[Depends(raise_after_yield, scope="function")],
    )
    
    app.include_router(
        prefix="/router-scope-request",
        router=router,
        dependencies=[Depends(raise_after_yield, scope="request")],
    )
    
    client = TestClient(app)
    
    
    def test_function_scope() -> None:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 6.7K bytes
    - Viewed (0)
Back to top