/
types.go
49 lines (41 loc) · 1.14 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package dto
import (
"errors"
"net/url"
"time"
"github.com/ory/fosite"
"golang.org/x/text/language"
)
const (
ParSegment = "fosite_par"
AuthCodeSegment = "fosite_auth_code"
PkceSessionSegment = "fosite_pkce_sessions"
RefreshTokenSegment = "fosite_refresh_token_sessions" //nolint: gosec
AccessTokenSegment = "fosite_access_token_sessions"
)
var ErrDataNotFound = errors.New("data not found")
type AuthorizeRequest struct {
ResponseTypes fosite.Arguments
RedirectURI *url.URL
State string
HandledResponseTypes fosite.Arguments
ResponseMode fosite.ResponseModeType
DefaultResponseMode fosite.ResponseModeType
ClientID string
}
type Request struct {
ID string
RequestedAt time.Time
RequestedScope fosite.Arguments
GrantedScope fosite.Arguments
Form url.Values
RequestedAudience fosite.Arguments
GrantedAudience fosite.Arguments
Lang language.Tag
ClientID string
SessionExtra map[string]interface{}
}