mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-13 12:52:24 +03:00
another goimports fix
This commit is contained in:
parent
b95070393e
commit
9ebcebee43
3 changed files with 4 additions and 7 deletions
|
@ -322,8 +322,6 @@ func (m *MSC3861UserVerifier) getUserByAccessToken(ctx context.Context, token st
|
||||||
logger.Debugf("PerformDeviceCreationResponse is: %+v", rs)
|
logger.Debugf("PerformDeviceCreationResponse is: %+v", rs)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return &requester{
|
return &requester{
|
||||||
Device: device,
|
Device: device,
|
||||||
UserID: userID,
|
UserID: userID,
|
||||||
|
@ -358,7 +356,7 @@ func (m *MSC3861UserVerifier) introspectToken(ctx context.Context, token string)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if c := resp.StatusCode; c < 200 || c >= 300 {
|
if c := resp.StatusCode; c < 200 || c >= 300 {
|
||||||
return nil, errors.New(strings.Join([]string{"The introspection endpoint returned a '", resp.Status ,"' response"}, ""))
|
return nil, errors.New(strings.Join([]string{"The introspection endpoint returned a '", resp.Status, "' response"}, ""))
|
||||||
}
|
}
|
||||||
var ir introspectionResponse
|
var ir introspectionResponse
|
||||||
if err := json.NewDecoder(body).Decode(&ir); err != nil {
|
if err := json.NewDecoder(body).Decode(&ir); err != nil {
|
||||||
|
@ -402,8 +400,7 @@ type OpenIDConfiguration struct {
|
||||||
AccountManagementActionsSupported []string `json:"account_management_actions_supported"`
|
AccountManagementActionsSupported []string `json:"account_management_actions_supported"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func fetchOpenIDConfiguration(httpClient *http.Client, authHostURL string) (*
|
func fetchOpenIDConfiguration(httpClient *http.Client, authHostURL string) (*OpenIDConfiguration, error) {
|
||||||
OpenIDConfiguration, error) {
|
|
||||||
u, err := url.Parse(authHostURL)
|
u, err := url.Parse(authHostURL)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
@ -1163,7 +1163,7 @@ func (d *KeyDatabase) StoreCrossSigningKeysForUser(ctx context.Context, userID s
|
||||||
// Normally this attribute depending on its value marks the master key as replaceable without UIA.
|
// Normally this attribute depending on its value marks the master key as replaceable without UIA.
|
||||||
func (d *KeyDatabase) UpdateMasterCrossSigningKeyAllowReplacementWithoutUIA(ctx context.Context, userID string, duration time.Duration) (int64, error) {
|
func (d *KeyDatabase) UpdateMasterCrossSigningKeyAllowReplacementWithoutUIA(ctx context.Context, userID string, duration time.Duration) (int64, error) {
|
||||||
var ts int64
|
var ts int64
|
||||||
err := d.Writer.Do(d.DB, nil, func(txn *sql.Tx) error {
|
err := d.Writer.Do(d.DB, nil, func(txn *sql.Tx) error {
|
||||||
var err error
|
var err error
|
||||||
ts, err = d.CrossSigningKeysTable.UpdateMasterCrossSigningKeyAllowReplacementWithoutUIA(ctx, txn, userID, duration)
|
ts, err = d.CrossSigningKeysTable.UpdateMasterCrossSigningKeyAllowReplacementWithoutUIA(ctx, txn, userID, duration)
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -39,7 +39,7 @@ var KeyTypeIntToPurpose = map[int16]fclient.CrossSigningKeyPurpose{
|
||||||
|
|
||||||
type CrossSigningKey struct {
|
type CrossSigningKey struct {
|
||||||
UpdatableWithoutUIABeforeMs *int64
|
UpdatableWithoutUIABeforeMs *int64
|
||||||
KeyData spec.Base64Bytes
|
KeyData spec.Base64Bytes
|
||||||
}
|
}
|
||||||
|
|
||||||
// Map of purpose -> public key
|
// Map of purpose -> public key
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue