Skip to content

Commit

Permalink
feat: export jwt security definition from resources (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
tjholm authored Dec 16, 2022
2 parents 4476419 + 17432a2 commit 0a515a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nitric/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#
"""Nitric Python SDK API Documentation. See: https://nitric.io/docs?lang=python for full framework documentation."""

from nitric.resources.apis import Api, api, MethodOptions, ApiOptions
from nitric.resources.apis import Api, api, MethodOptions, ApiOptions, JwtSecurityDefinition
from nitric.resources.buckets import Bucket, bucket
from nitric.resources.collections import Collection, collection
from nitric.resources.queues import Queue, queue
Expand All @@ -30,6 +30,7 @@
"api",
"Api",
"ApiOptions",
"JwtSecurityDefinition",
"MethodOptions",
"bucket",
"Bucket",
Expand All @@ -42,5 +43,5 @@
"secret",
"Secret",
"topic",
"Topic"
"Topic",
]
2 changes: 2 additions & 0 deletions nitric/resources/apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#
from __future__ import annotations
from typing import List, Union
from dataclasses import dataclass
from nitric.faas import ApiWorkerOptions, FunctionServer, HttpMiddleware, Middleware, MethodOptions, HttpMethod
from nitric.application import Nitric
from nitric.resources.base import BaseResource
Expand All @@ -34,6 +35,7 @@
from nitric.api.exception import exception_from_grpc_error


@dataclass
class JwtSecurityDefinition:
"""Represents the JWT security definition for an API."""

Expand Down

0 comments on commit 0a515a1

Please sign in to comment.