Skip to content

Commit

Permalink
authSpecification -> advanced_auth
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
  • Loading branch information
grubberr committed Mar 19, 2022
1 parent 97b66a3 commit be160fa
Showing 1 changed file with 49 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
"title": "Authenticate via GitHub (OAuth)",
"required": ["access_token"],
"properties": {
"option_title": {
"auth_type": {
"type": "string",
"title": "Credentials Title",
"description": "OAuth Credentials",
"const": "OAuth Credentials"
"const": "oauth2.0",
"enum": ["oauth2.0"],
"default": "oauth2.0"
},
"access_token": {
"type": "string",
Expand All @@ -36,11 +36,11 @@
"title": "Authenticate with Personal Access Token",
"required": ["personal_access_token"],
"properties": {
"option_title": {
"auth_type": {
"type": "string",
"title": "Credentials Title",
"description": "PAT Credentials",
"const": "PAT Credentials"
"const": "token",
"enum": ["token"],
"default": "token"
},
"personal_access_token": {
"type": "string",
Expand Down Expand Up @@ -85,12 +85,47 @@
}
}
},
"authSpecification": {
"auth_type": "oauth2.0",
"oauth2Specification": {
"rootObject": ["credentials", 0],
"oauthFlowInitParameters": [],
"oauthFlowOutputParameters": [["access_token"]]
"advanced_auth": {
"auth_flow_type": "oauth2.0",
"predicate_key": ["credentials", "auth_type"],
"predicate_value": "oauth2.0",
"oauth_config_specification": {
"complete_oauth_output_specification": {
"type": "object",
"additionalProperties": false,
"properties": {
"access_token": {
"type": "string",
"path_in_connector_config": ["credentials", "access_token"]
}
}
},
"complete_oauth_server_input_specification": {
"type": "object",
"additionalProperties": false,
"properties": {
"client_id": {
"type": "string"
},
"client_secret": {
"type": "string"
}
}
},
"complete_oauth_server_output_specification": {
"type": "object",
"additionalProperties": false,
"properties": {
"client_id": {
"type": "string",
"path_in_connector_config": ["credentials", "client_id"]
},
"client_secret": {
"type": "string",
"path_in_connector_config": ["credentials", "client_secret"]
}
}
}
}
}
}

1 comment on commit be160fa

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SonarQube Report

SonarQube report for Airbyte Connectors Source Github(#11212)

Measures

Name Value Name Value Name Value
Quality Gate Status OK Security Rating A Reliability Rating A
Duplicated Blocks 5 Lines to Cover 1 Lines of Code 872
Bugs 0 Vulnerabilities 0 Code Smells 4
Coverage 100.0 Duplicated Lines (%) 0.0 Blocker Issues 0
Critical Issues 2 Major Issues 2 Minor Issues 1

Detected Issues

Rule File Description Message
python:black_need_format (MINOR) source_github/streams.py Please run one of the commands: "black --config ./pyproject.toml <path_to_updated_folder>" or "./gradlew format" 1 code part(s) should be updated.
python:S3776 (CRITICAL) source_github/streams.py:91 Cognitive Complexity of functions should not be too high Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed.
python:S5886 (MAJOR) source_github/streams.py:84 Function return types should be consistent with their type hint Return a value of type "Union[int, float]" instead of "NoneType" or update function "backoff_time" type hint.
python:S5797 (CRITICAL) fixtures/github.py:79 Constants should not be used as conditions Replace this expression; used as a condition it will always be constant.
python:S112 (MAJOR) source_github/source.py:73 "Exception" and "BaseException" should not be raised Replace this generic exception class with a more specific one.

Coverage (100.0%)

File Coverage File Coverage
fixtures/github.py 0.0 fixtures/main.py 0.0
source_github/init.py 100.0 source_github/source.py 48.3
source_github/streams.py 53.3

Please sign in to comment.