Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 264 for Credentials (0.35 sec)

  1. okhttp/src/main/kotlin/okhttp3/Credentials.kt

     */
    package okhttp3
    
    import java.nio.charset.Charset
    import kotlin.text.Charsets.ISO_8859_1
    import okio.ByteString.Companion.encode
    
    /** Factory for HTTP authorization credentials. */
    object Credentials {
      /** Returns an auth credential for the Basic scheme. */
      @JvmStatic @JvmOverloads
      fun basic(
        username: String,
        password: String,
        charset: Charset = ISO_8859_1,
      ): String {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  2. internal/auth/credentials.go

    }
    
    // IsServiceAccount - returns whether credential is a service account or not
    func (cred Credentials) IsServiceAccount() bool {
    	_, ok := cred.Claims[iamPolicyClaimNameSA]
    	return cred.ParentUser != "" && ok
    }
    
    // IsValid - returns whether credential is valid or not.
    func (cred Credentials) IsValid() bool {
    	// Verify credentials if its enabled or not set.
    	if cred.Status == AccountOff {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  3. internal/auth/credentials_test.go

    		ccred          Credentials
    		expectedResult bool
    	}{
    		// Same Credentialss.
    		{cred, cred, true},
    		// Empty credentials to compare.
    		{cred, Credentials{}, false},
    		// Empty credentials.
    		{Credentials{}, cred, false},
    		// Two different credentialss
    		{cred, cred2, false},
    		// Access key is different in credentials to compare.
    		{cred, Credentials{AccessKey: "myuser", SecretKey: cred.SecretKey}, false},
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  4. docs/sts/assume-role.go

    	"os"
    	"time"
    
    	"github.com/minio/minio-go/v7"
    	cr "github.com/minio/minio-go/v7/pkg/credentials"
    )
    
    var (
    	// Minio endpoint (for STS API)
    	stsEndpoint string
    
    	// User account credentials
    	minioUsername string
    	minioPassword string
    
    	// Display credentials flag
    	displayCreds bool
    
    	// Credential expiry duration
    	expiryDuration time.Duration
    
    	// Bucket to list
    	bucketToList string
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 12 16:09:55 GMT 2024
    - 4K bytes
    - Viewed (1)
  5. tests/test_security_http_bearer.py

    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    security = HTTPBearer()
    
    
    @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_bearer():
        response = client.get("/users/me", headers={"Authorization": "Bearer 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)
  6. tests/test_security_http_basic_optional.py

    app = FastAPI()
    
    security = HTTPBasic(auto_error=False)
    
    
    @app.get("/users/me")
    def read_current_user(credentials: Optional[HTTPBasicCredentials] = Security(security)):
        if credentials is None:
            return {"msg": "Create an account first"}
        return {"username": credentials.username, "password": credentials.password}
    
    
    client = TestClient(app)
    
    
    def test_security_http_basic():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  7. cmd/object-handlers_test.go

    			objectName:         objectName,
    			accessKey:          credentials.AccessKey,
    			secretKey:          credentials.SecretKey,
    			expectedRespStatus: http.StatusOK,
    		},
    		// Test case - 2.
    		// Case with non-existent object name.
    		{
    			bucketName:         bucketName,
    			objectName:         "abcd",
    			accessKey:          credentials.AccessKey,
    			secretKey:          credentials.SecretKey,
    			expectedRespStatus: http.StatusNotFound,
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 160K bytes
    - Viewed (0)
  8. tests/test_security_http_base_optional.py

    security = HTTPBase(scheme="Other", 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_base():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  9. tests/test_security_http_basic_realm.py

    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    security = HTTPBasic(realm="simple")
    
    
    @app.get("/users/me")
    def read_current_user(credentials: HTTPBasicCredentials = Security(security)):
        return {"username": credentials.username, "password": credentials.password}
    
    
    client = TestClient(app)
    
    
    def test_security_http_basic():
        response = client.get("/users/me", auth=("john", "secret"))
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  10. tests/test_security_http_base.py

    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    security = HTTPBase(scheme="Other")
    
    
    @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_base():
        response = client.get("/users/me", headers={"Authorization": "Other foobar"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.7K bytes
    - Viewed (0)
Back to top