Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ocervell committed Apr 24, 2024
1 parent 44f5195 commit 831cac2
Showing 1 changed file with 52 additions and 12 deletions.
64 changes: 52 additions & 12 deletions routes/rules/fastapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,38 @@ rules:
- id: fastapi-route-authenticated
patterns:
- pattern-either:
- pattern: |
@$APP.$METHOD($PATH, ...)
def $FUNC(..., token, ...):
...
- pattern: |
@$APP.$METHOD($PATH, ...)
def $FUNC(..., current_user, ...):
...
- pattern: |
@$APP.$METHOD($PATH, ...)
def $FUNC(..., auth_result, ...):
...
- pattern: |
@$APP.$METHOD($PATH, ...)
def $FUNC(..., token, ...):
...
- pattern: |
@$APP.$METHOD($PATH, ...)
def $FUNC(..., current_user, ...):
...
- pattern: |
@$APP.$METHOD($PATH, ...)
def $FUNC(..., auth_result, ...):
...
- pattern: |
@$APP.$METHOD($PATH, ...)
@auth_required
def $FUNC(...):
...
- pattern: |
@$APP.$METHOD($PATH, ...)
@login_required
def $FUNC(...):
...
- pattern: |
@$APP.$METHOD($PATH, ...)
@requires_authentication
def $FUNC(...):
...
- pattern: |
@$APP.$METHOD($PATH, ...)
@jwt_required
def $FUNC(...):
...
- metavariable-pattern:
metavariable: $METHOD
pattern-either:
Expand Down Expand Up @@ -55,6 +75,26 @@ rules:
@$APP.$METHOD($PATH, ...)
def $FUNC(..., auth_result, ...):
...
- pattern-not: |
@$APP.$METHOD($PATH, ...)
@auth_required
def $FUNC(...):
...
- pattern-not: |
@$APP.$METHOD($PATH, ...)
@login_required
def $FUNC(...):
...
- pattern-not: |
@$APP.$METHOD($PATH, ...)
@requires_authentication
def $FUNC(...):
...
- pattern-not: |
@$APP.$METHOD($PATH, ...)
@jwt_required
def $FUNC(...):
...
- metavariable-pattern:
metavariable: $METHOD
pattern-either:
Expand Down

0 comments on commit 831cac2

Please sign in to comment.