Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 447 for Credentials (0.21 sec)

  1. docs_src/security/tutorial006_an_py39.py

    from fastapi.security import HTTPBasic, HTTPBasicCredentials
    
    app = FastAPI()
    
    security = HTTPBasic()
    
    
    @app.get("/users/me")
    def read_current_user(credentials: Annotated[HTTPBasicCredentials, Depends(security)]):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 361 bytes
    - Viewed (0)
  2. docs_src/security/tutorial007_an_py39.py

    security = HTTPBasic()
    
    
    def get_current_username(
        credentials: Annotated[HTTPBasicCredentials, Depends(security)],
    ):
        current_username_bytes = credentials.username.encode("utf8")
        correct_username_bytes = b"stanleyjobson"
        is_correct_username = secrets.compare_digest(
            current_username_bytes, correct_username_bytes
        )
        current_password_bytes = credentials.password.encode("utf8")
        correct_password_bytes = b"swordfish"
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_security/test_tutorial006_an.py

    
    def test_security_http_basic_no_credentials():
        response = client.get("/users/me")
        assert response.json() == {"detail": "Not authenticated"}
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == "Basic"
    
    
    def test_security_http_basic_invalid_credentials():
        response = client.get(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/fess/es/config/exentity/DataConfig.java

                    final AuthScope authScope = getAuthScope(webAuthName, scheme, paramMap);
                    final Credentials credentials = getCredentials(webAuthName, scheme, paramMap);
                    basicAuthList.add(new AuthenticationImpl(authScope, credentials, authScheme));
                }
                factoryParamMap.put(HcHttpClient.BASIC_AUTHENTICATIONS_PROPERTY,
    Java
    - Registered: Mon Apr 29 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  5. cmd/bucket-policy-handlers_test.go

    		{
    			bucketName:         bucketName,
    			accessKey:          credentials.AccessKey,
    			secretKey:          credentials.SecretKey,
    			expectedRespStatus: http.StatusNoContent,
    		},
    		// Test case - 2.
    		// Case with non-existent-bucket.
    		{
    			bucketName:         "non-existent-bucket",
    			accessKey:          credentials.AccessKey,
    			secretKey:          credentials.SecretKey,
    			expectedRespStatus: http.StatusNotFound,
    		},
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 32.7K bytes
    - Viewed (0)
  6. fastapi/security/http.py

        def read_current_user(
            credentials: Annotated[HTTPAuthorizationCredentials, Depends(security)]
        ):
            return {"scheme": credentials.scheme, "credentials": credentials.credentials}
        ```
        """
    
        def __init__(
            self,
            *,
            bearerFormat: Annotated[Optional[str], Doc("Bearer token format.")] = None,
            scheme_name: Annotated[
                Optional[str],
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Apr 19 15:29:38 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  7. src/main/java/jcifs/context/AbstractCIFSContext.java

        public AbstractCIFSContext () {
            Runtime.getRuntime().addShutdownHook(this);
        }
    
    
        /**
         * @param creds
         * @return a wrapped context with the given credentials
         */
        @Override
        public CIFSContext withCredentials ( Credentials creds ) {
            return new CIFSContextCredentialWrapper(this, creds);
        }
    
    
        /**
         * 
         * {@inheritDoc}
         *
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Tue Jul 07 10:50:16 GMT 2020
    - 3.7K bytes
    - Viewed (0)
  8. cmd/auth-handler.go

    		// x-amz-security-token should not present for static credentials.
    		return nil, ErrInvalidToken
    	}
    
    	if !cred.IsServiceAccount() && cred.IsTemp() && subtle.ConstantTimeCompare([]byte(token), []byte(cred.SessionToken)) != 1 {
    		// validate token for temporary credentials only.
    		return nil, ErrInvalidToken
    	}
    
    	// Expired credentials must return error right away.
    	if cred.IsTemp() && cred.IsExpired() {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 26K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb/CredentialsInternal.java

    
    import javax.security.auth.Subject;
    
    import jcifs.CIFSContext;
    import jcifs.CIFSException;
    import jcifs.Credentials;
    
    
    /**
     * @author mbechler
     *
     */
    public interface CredentialsInternal extends Cloneable, Credentials {
    
        /**
         * 
         * @return a copy of the credentials
         */
        CredentialsInternal clone ();
    
    
        /**
         * @param tc
         * @param targetDomain
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Sun Jul 01 13:12:10 GMT 2018
    - 1.6K bytes
    - Viewed (0)
  10. cmd/iam-store.go

    		isDerived := false
    		if v.Credentials.IsServiceAccount() || v.Credentials.IsTemp() {
    			isDerived = true
    		}
    
    		if !isDerived && v.Credentials.AccessKey == accessKey {
    			userExists = true
    		} else if isDerived && v.Credentials.ParentUser == accessKey {
    			userExists = true
    			if v.Credentials.IsTemp() {
    				// Hide secret key & session key here
    				v.Credentials.SecretKey = ""
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Apr 27 10:04:10 GMT 2024
    - 75.2K bytes
    - Viewed (2)
Back to top