| 
									
										
										
										
											2021-08-12 21:03:24 +02:00
										 |  |  | package oauth2 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import ( | 
					
						
							| 
									
										
										
										
											2025-06-06 15:14:37 +02:00
										 |  |  | 	"net/url" | 
					
						
							| 
									
										
										
										
											2021-08-12 21:03:24 +02:00
										 |  |  | 	"time" | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type ( | 
					
						
							|  |  |  | 	// ClientInfo the client information model interface | 
					
						
							|  |  |  | 	ClientInfo interface { | 
					
						
							|  |  |  | 		GetID() string | 
					
						
							|  |  |  | 		GetSecret() string | 
					
						
							|  |  |  | 		GetDomain() string | 
					
						
							| 
									
										
										
										
											2025-06-06 15:14:37 +02:00
										 |  |  | 		IsPublic() bool | 
					
						
							| 
									
										
										
										
											2021-08-12 21:03:24 +02:00
										 |  |  | 		GetUserID() string | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// ClientPasswordVerifier the password handler interface | 
					
						
							|  |  |  | 	ClientPasswordVerifier interface { | 
					
						
							|  |  |  | 		VerifyPassword(string) bool | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// TokenInfo the token information model interface | 
					
						
							|  |  |  | 	TokenInfo interface { | 
					
						
							|  |  |  | 		New() TokenInfo | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		GetClientID() string | 
					
						
							|  |  |  | 		SetClientID(string) | 
					
						
							|  |  |  | 		GetUserID() string | 
					
						
							|  |  |  | 		SetUserID(string) | 
					
						
							|  |  |  | 		GetRedirectURI() string | 
					
						
							|  |  |  | 		SetRedirectURI(string) | 
					
						
							|  |  |  | 		GetScope() string | 
					
						
							|  |  |  | 		SetScope(string) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		GetCode() string | 
					
						
							|  |  |  | 		SetCode(string) | 
					
						
							|  |  |  | 		GetCodeCreateAt() time.Time | 
					
						
							|  |  |  | 		SetCodeCreateAt(time.Time) | 
					
						
							|  |  |  | 		GetCodeExpiresIn() time.Duration | 
					
						
							|  |  |  | 		SetCodeExpiresIn(time.Duration) | 
					
						
							|  |  |  | 		GetCodeChallenge() string | 
					
						
							|  |  |  | 		SetCodeChallenge(string) | 
					
						
							|  |  |  | 		GetCodeChallengeMethod() CodeChallengeMethod | 
					
						
							|  |  |  | 		SetCodeChallengeMethod(CodeChallengeMethod) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		GetAccess() string | 
					
						
							|  |  |  | 		SetAccess(string) | 
					
						
							|  |  |  | 		GetAccessCreateAt() time.Time | 
					
						
							|  |  |  | 		SetAccessCreateAt(time.Time) | 
					
						
							|  |  |  | 		GetAccessExpiresIn() time.Duration | 
					
						
							|  |  |  | 		SetAccessExpiresIn(time.Duration) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		GetRefresh() string | 
					
						
							|  |  |  | 		SetRefresh(string) | 
					
						
							|  |  |  | 		GetRefreshCreateAt() time.Time | 
					
						
							|  |  |  | 		SetRefreshCreateAt(time.Time) | 
					
						
							|  |  |  | 		GetRefreshExpiresIn() time.Duration | 
					
						
							|  |  |  | 		SetRefreshExpiresIn(time.Duration) | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2025-06-06 15:14:37 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	ExtendableTokenInfo interface { | 
					
						
							|  |  |  | 		TokenInfo | 
					
						
							|  |  |  | 		GetExtension() url.Values | 
					
						
							|  |  |  | 		SetExtension(url.Values) | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2021-08-12 21:03:24 +02:00
										 |  |  | ) |