-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1908 from okta/isaacokta_1864
Isaacokta 1864
- Loading branch information
Showing
5 changed files
with
148 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// DO NOT EDIT LOCAL SDK - USE v3 okta-sdk-golang FOR API CALLS THAT DO NOT EXIST IN LOCAL SDK | ||
package sdk | ||
|
||
import "encoding/json" | ||
|
||
type AuthenticatorSettingsOTP struct { | ||
AcceptableAdjacentIntervals int `json:"acceptableAdjacentIntervals"` | ||
Algorithm string `json:"algorithm"` | ||
Encoding string `json:"encoding"` | ||
PassCodeLength int `json:"passCodeLength"` | ||
Protocol string `json:"protocol"` | ||
TimeIntervalInSeconds int `json:"timeIntervalInSeconds"` | ||
} | ||
|
||
func (a *AuthenticatorSettingsOTP) MarshalJSON() ([]byte, error) { | ||
type Alias AuthenticatorSettingsOTP | ||
type local struct { | ||
*Alias | ||
} | ||
result := local{Alias: (*Alias)(a)} | ||
return json.Marshal(&result) | ||
} | ||
|
||
func (a *AuthenticatorSettingsOTP) UnmarshalJSON(data []byte) error { | ||
type Alias AuthenticatorSettingsOTP | ||
|
||
result := &struct { | ||
*Alias | ||
}{ | ||
Alias: (*Alias)(a), | ||
} | ||
if err := json.Unmarshal(data, &result); err != nil { | ||
return err | ||
} | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters