feat: Cấu hình các hằng số client OAuth2 và định tuyến Traefik cho các endpoint OIDC của IdentityServer.
This commit is contained in:
Binary file not shown.
@@ -26,9 +26,17 @@ enum APIConfig {
|
||||
/// OAuth2 token endpoint (không có version prefix)
|
||||
static let tokenEndpoint = "/connect/token"
|
||||
|
||||
/// OAuth2 client ID for password grant
|
||||
/// OAuth2 client ID cho password grant
|
||||
static let oauthClientId = "password-client"
|
||||
|
||||
/// OAuth2 client secret for password grant
|
||||
/// OAuth2 client secret cho password grant
|
||||
static let oauthClientSecret = "password-client-secret"
|
||||
|
||||
/// OAuth2 scope for authentication
|
||||
/// OAuth2 scope cho xác thực
|
||||
static let oauthScope = "openid profile email offline_access"
|
||||
static let oauthScope = "openid profile email api offline_access"
|
||||
|
||||
/// Request timeout in seconds
|
||||
/// Thời gian timeout request (giây)
|
||||
|
||||
@@ -121,6 +121,8 @@ final class AuthManager: ObservableObject {
|
||||
// OAuth2 Password Grant
|
||||
let formData: [String: String] = [
|
||||
"grant_type": "password",
|
||||
"client_id": APIConfig.oauthClientId,
|
||||
"client_secret": APIConfig.oauthClientSecret,
|
||||
"username": email,
|
||||
"password": password,
|
||||
"scope": APIConfig.oauthScope
|
||||
|
||||
Reference in New Issue
Block a user