ProtocolUtils class
OAuth 2.0 protokolüne özgü değerler için yardımcılar sağlayan sınıf
Yöntemler
| generate |
Ortak kitaplık tarafından kullanılan durum değerini oluşturur. |
| parse |
Durumu, LibraryState bilgilerini ve kullanıcı tarafından geçirilen durumu içeren RequestStateObject içine ayrıştırıyor. |
| set |
Kullanıcı durumunu rastgele guid ile ekler veya rastgele guid döndürür. |
Yöntem Ayrıntıları
generateLibraryState(ICrypto, Record<string, string>)
Ortak kitaplık tarafından kullanılan durum değerini oluşturur.
static function generateLibraryState(cryptoObj: ICrypto, meta?: Record<string, string>): string
Parametreler
- cryptoObj
- ICrypto
- meta
-
Record<string, string>
Döndürülenler
string
parseRequestState(ICrypto, string)
Durumu, LibraryState bilgilerini ve kullanıcı tarafından geçirilen durumu içeren RequestStateObject içine ayrıştırıyor.
static function parseRequestState(cryptoObj: ICrypto, state: string): RequestStateObject
Parametreler
- cryptoObj
- ICrypto
- state
-
string
Döndürülenler
setRequestState(ICrypto, string, Record<string, string>)
Kullanıcı durumunu rastgele guid ile ekler veya rastgele guid döndürür.
static function setRequestState(cryptoObj: ICrypto, userState?: string, meta?: Record<string, string>): string
Parametreler
- cryptoObj
- ICrypto
- userState
-
string
- meta
-
Record<string, string>
Döndürülenler
string