Skip to content

Commit e3c4c1b

Browse files
authored
Added back warnings for MFA and JIT around Private Preview (#2653)
1 parent ff50227 commit e3c4c1b

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

MSAL/src/native_auth/public/state_machine/state/JITStates+Internal.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ extension RegisterStrongAuthBaseState {
2626
func requestChallengeInternal(authMethod: MSALAuthMethod,
2727
verificationContact: String?) async -> MSALNativeAuthJITControlling.JITRequestChallengeControllerResponse {
2828
let context = MSALNativeAuthRequestContext(correlationId: correlationId)
29+
MSALNativeAuthLogger.log(level: .warning, context: context, format: MSALNativeAuthLogMessage.privatePreviewLog)
2930
MSALNativeAuthLogger.log(level: .info, context: context, format: "RegisterStrongAuth, Request Challenge")
3031
return await controller.requestJITChallenge(continuationToken: continuationToken,
3132
authMethod: authMethod,
@@ -38,6 +39,7 @@ extension RegisterStrongAuthVerificationRequiredState {
3839

3940
func submitChallengeInternal(challenge: String) async -> MSALNativeAuthJITControlling.JITSubmitChallengeControllerResponse {
4041
let context = MSALNativeAuthRequestContext(correlationId: correlationId)
42+
MSALNativeAuthLogger.log(level: .warning, context: context, format: MSALNativeAuthLogMessage.privatePreviewLog)
4143
MSALNativeAuthLogger.log(level: .info, context: context, format: "RegisterStrongAuth, Submit Challenge")
4244
guard inputValidator.isInputValid(challenge) else {
4345
MSALNativeAuthLogger.log(level: .error, context: context, format: "RegisterStrongAuth, invalid challenge")

MSAL/src/native_auth/public/state_machine/state/JITStates.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public class RegisterStrongAuthBaseState: MSALNativeAuthBaseState {
6363
public class RegisterStrongAuthState: RegisterStrongAuthBaseState {
6464

6565
/// Requests the server to send the challenge to the default authentication method.
66+
/// - Warning: ⚠️ this API is experimental. It may be changed in the future without notice. Do not use in production applications.
6667
/// - Parameters:
6768
/// - parameters: Parameters used to challenge an authentication method
6869
/// - delegate: Delegate that receives callbacks for the operation.
@@ -90,6 +91,7 @@ public class RegisterStrongAuthVerificationRequiredState: RegisterStrongAuthBase
9091
}
9192

9293
/// Submits the challenge to verify the authentication method selected.
94+
/// - Warning: ⚠️ this API is experimental. It may be changed in the future without notice. Do not use in production applications.
9395
/// - Parameters:
9496
/// - challenge: Verification challenge that the user supplies.
9597
/// - delegate: Delegate that receives callbacks for the operation.
@@ -107,6 +109,7 @@ public class RegisterStrongAuthVerificationRequiredState: RegisterStrongAuthBase
107109
}
108110

109111
/// Requests the server to send the challenge to the default authentication method.
112+
/// - Warning: ⚠️ this API is experimental. It may be changed in the future without notice. Do not use in production applications.
110113
/// - Parameters:
111114
/// - parameters: Parameters used to challenge an authentication method
112115
/// - delegate: Delegate that receives callbacks for the operation.

MSAL/src/native_auth/public/state_machine/state/MFAStates+Internal.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import Foundation
2727
extension MFABaseState {
2828
func requestChallengeInternal(authMethod: MSALAuthMethod?) async -> MSALNativeAuthMFAControlling.MFARequestChallengeControllerResponse {
2929
let context = MSALNativeAuthRequestContext(correlationId: correlationId)
30+
MSALNativeAuthLogger.log(level: .warning, context: context, format: MSALNativeAuthLogMessage.privatePreviewLog)
3031
MSALNativeAuthLogger.log(level: .info, context: context, format: "MFA, request challenge")
3132
return await controller.requestChallenge(
3233
continuationToken: continuationToken,
@@ -41,6 +42,7 @@ extension MFABaseState {
4142
extension MFARequiredState {
4243
func getAuthMethodsInternal() async -> MSALNativeAuthMFAControlling.MFAGetAuthMethodsControllerResponse {
4344
let context = MSALNativeAuthRequestContext(correlationId: correlationId)
45+
MSALNativeAuthLogger.log(level: .warning, context: context, format: MSALNativeAuthLogMessage.privatePreviewLog)
4446
MSALNativeAuthLogger.log(level: .info, context: context, format: "MFA, get authentication methods")
4547
return await controller.getAuthMethods(
4648
continuationToken: continuationToken,
@@ -52,6 +54,7 @@ extension MFARequiredState {
5254

5355
func submitChallengeInternal(challenge: String) async -> MSALNativeAuthMFAControlling.MFASubmitChallengeControllerResponse {
5456
let context = MSALNativeAuthRequestContext(correlationId: correlationId)
57+
MSALNativeAuthLogger.log(level: .warning, context: context, format: MSALNativeAuthLogMessage.privatePreviewLog)
5558
MSALNativeAuthLogger.log(level: .info, context: context, format: "MFA, submit challenge")
5659
guard inputValidator.isInputValid(challenge) else {
5760
MSALNativeAuthLogger.log(level: .error, context: context, format: "MFA, invalid challenge")

MSAL/src/native_auth/public/state_machine/state/MFAStates.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ import Foundation
7373
public class AwaitingMFAState: MFABaseState {
7474

7575
/// Requests the server to send the challenge to the default authentication method.
76+
/// - Warning: ⚠️ this API is experimental. It may be changed in the future without notice. Do not use in production applications.
7677
/// - Parameter delegate: Delegate that receives callbacks for the operation.
7778
public func requestChallenge(delegate: MFARequestChallengeDelegate) {
7879
baseRequestChallenge(authMethod: nil, delegate: delegate)
@@ -102,6 +103,7 @@ public class MFARequiredState: MFABaseState {
102103
}
103104

104105
/// Requests the server to send the challenge to the specified auth method or the default one.
106+
/// - Warning: ⚠️ this API is experimental. It may be changed in the future without notice. Do not use in production applications.
105107
/// - Parameters:
106108
/// - authMethod: Optional. The authentication method you want to use for sending the challenge
107109
/// - delegate: Delegate that receives callbacks for the operation.
@@ -110,6 +112,7 @@ public class MFARequiredState: MFABaseState {
110112
}
111113

112114
/// Requests the available MFA authentication methods.
115+
/// - Warning: ⚠️ this API is experimental. It may be changed in the future without notice. Do not use in production applications.
113116
/// - Parameter delegate: Delegate that receives callbacks for the operation.
114117
public func getAuthMethods(delegate: MFAGetAuthMethodsDelegate) {
115118
Task {
@@ -129,6 +132,7 @@ public class MFARequiredState: MFABaseState {
129132
}
130133

131134
/// Submits the MFA challenge to the server for verification.
135+
/// - Warning: ⚠️ this API is experimental. It may be changed in the future without notice. Do not use in production applications.
132136
/// - Parameters:
133137
/// - challenge: Verification challenge that the user supplies.
134138
/// - delegate: Delegate that receives callbacks for the operation.

0 commit comments

Comments
 (0)