Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/OAuth2 #33

Merged
merged 24 commits into from
Feb 7, 2024
Merged

feature/OAuth2 #33

merged 24 commits into from
Feb 7, 2024

Conversation

a3828162
Copy link
Contributor

  • Use Middleware for authorization
  • Consumer retrieve token
  • Replace the service name in each HTTP request of the producer with the OpenAPI name
  • Complete unit test of router_auth_check_test.go

2. modify nudr.dm to nudr.dr
3. remove NewRouterAuthorizationChekck in AddService() in every producer router.go
4. add _ NFContext = &UDMContext in context.go
1. each const serviceName
2. each const nfType
Modify:
1. getTokenCtx() argument
@a3828162 a3828162 marked this pull request as ready for review January 23, 2024 05:45
@andy89923 andy89923 self-requested a review January 23, 2024 05:52
Copy link
Contributor

@ianchen0119 ianchen0119 left a comment

Choose a reason for hiding this comment

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

Hi @a3828162
Please update the patch based on my comments.
Thanks.

1. move ServiceName and NfType to util package
2. replace ServiceName and NfType constant
3. remove command line
Copy link
Contributor

@andy89923 andy89923 left a comment

Choose a reason for hiding this comment

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

LGTM!

)

const (
NfTypeNRF = models.NfType_NRF
Copy link
Collaborator

Choose a reason for hiding this comment

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

no need to define const again, directly use models

@@ -13,6 +13,23 @@ const (
UdmDefaultConfigPath = "./config/udmcfg.yaml"
)

const (
ServiceNameNnrfDisc = string(models.ServiceName_NNRF_DISC)
Copy link
Collaborator

Choose a reason for hiding this comment

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

no need to define const again, directly use string(models.ServiceNAme_xxx)

@ianchen0119 ianchen0119 merged commit 4e377b7 into free5gc:main Feb 7, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants