Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 265 for Credentials (0.2 sec)

  1. docs_src/security/tutorial007_an.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.2K bytes
    - Viewed (0)
  2. docs/sts/web-identity.go

    			return
    		}
    
    		var getWebTokenExpiry func() (*credentials.WebIdentityToken, error)
    		if clientSec == "" {
    			getWebTokenExpiry = func() (*credentials.WebIdentityToken, error) {
    				return &credentials.WebIdentityToken{
    					Token: r.Form.Get("id_token"),
    				}, nil
    			}
    		} else {
    			getWebTokenExpiry = func() (*credentials.WebIdentityToken, error) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 19 09:13:33 GMT 2023
    - 7.8K bytes
    - Viewed (3)
  3. docs_src/security/tutorial005_an.py

            if username is None:
                raise credentials_exception
            token_scopes = payload.get("scopes", [])
            token_data = TokenData(scopes=token_scopes, username=username)
        except (JWTError, ValidationError):
            raise credentials_exception
        user = get_user(fake_users_db, username=token_data.username)
        if user is None:
            raise credentials_exception
        for scope in security_scopes.scopes:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  4. cmd/bucket-targets.go

    	}
    	// validate if target credentials are ok
    	exists, err := clnt.BucketExists(ctx, tgt.TargetBucket)
    	if err != nil {
    		switch minio.ToErrorResponse(err).Code {
    		case "NoSuchBucket":
    			return BucketRemoteTargetNotFound{Bucket: tgt.TargetBucket, Err: err}
    		case "AccessDenied":
    			return RemoteTargetConnectionErr{Bucket: tgt.TargetBucket, AccessKey: tgt.Credentials.AccessKey, Err: err}
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/authenticator/JavaNetAuthenticator.kt

            val credentialHeader = if (proxyAuthorization) "Proxy-Authorization" else "Authorization"
            val credential =
              Credentials.basic(
                auth.userName,
                String(auth.password),
                challenge.charset,
              )
            return request.newBuilder()
              .header(credentialHeader, credential)
              .build()
          }
        }
    
        return null // No challenges were satisfied!
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  6. cmd/sts-handlers.go

    		return auth.Credentials{}, s3Err
    	}
    
    	// Temporary credentials or Service accounts cannot generate further temporary credentials.
    	if user.IsTemp() || user.IsServiceAccount() {
    		return auth.Credentials{}, ErrAccessDenied
    	}
    
    	// Session tokens are not allowed in STS AssumeRole requests.
    	if getSessionToken(r) != "" {
    		return auth.Credentials{}, ErrAccessDenied
    	}
    
    	return user, ErrNone
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 21:31:13 GMT 2024
    - 34.7K bytes
    - Viewed (2)
  7. helm/minio/templates/_helper_create_svcacct.txt

    createSvcacct () {
      USER=$1
      FILENAME=$2
      #check accessKey_and_secretKey_tmp file
      if [[ ! -f $MINIO_ACCESSKEY_SECRETKEY_TMP ]];then
        echo "credentials file does not exist"
        return 1
      fi
      if [[ $(cat $MINIO_ACCESSKEY_SECRETKEY_TMP|wc -l) -ne 2 ]];then
        echo "credentials file is invalid"
        rm -f $MINIO_ACCESSKEY_SECRETKEY_TMP
        return 1
      fi
      SVCACCT=$(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP)
    Plain Text
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Mar 28 23:20:50 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  8. tests/test_security_http_digest.py

    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    security = HTTPDigest()
    
    
    @app.get("/users/me")
    def read_current_user(credentials: HTTPAuthorizationCredentials = Security(security)):
        return {"scheme": credentials.scheme, "credentials": credentials.credentials}
    
    
    client = TestClient(app)
    
    
    def test_security_http_digest():
        response = client.get("/users/me", headers={"Authorization": "Digest foobar"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2K bytes
    - Viewed (0)
  9. cmd/admin-handlers-users.go

    					}
    				}
    				svcAccts[user] = madmin.SRSvcAccCreate{
    					Parent:        acc.Credentials.ParentUser,
    					AccessKey:     user,
    					SecretKey:     acc.Credentials.SecretKey,
    					Groups:        acc.Credentials.Groups,
    					Claims:        claims,
    					SessionPolicy: json.RawMessage(policyJSON),
    					Status:        acc.Credentials.Status,
    					Name:          sa.Name,
    					Description:   sa.Description,
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 12:41:13 GMT 2024
    - 77.5K bytes
    - Viewed (0)
  10. tests/test_security_http_bearer_optional.py

    security = HTTPBearer(auto_error=False)
    
    
    @app.get("/users/me")
    def read_current_user(
        credentials: Optional[HTTPAuthorizationCredentials] = Security(security),
    ):
        if credentials is None:
            return {"msg": "Create an account first"}
        return {"scheme": credentials.scheme, "credentials": credentials.credentials}
    
    
    client = TestClient(app)
    
    
    def test_security_http_bearer():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.1K bytes
    - Viewed (0)
Back to top