add frontend auth middleware, embed user data in frontend html
This commit is contained in:
		
							parent
							
								
									d8cb8c8fa8
								
							
						
					
					
						commit
						0fa769a248
					
				
					 12 changed files with 265 additions and 42 deletions
				
			
		| 
						 | 
				
			
			@ -34,7 +34,7 @@ func (s *TokenStore) GetApplication(ctx context.Context, id ulid.ULID) (database
 | 
			
		|||
	return app, errors.Wrap(err, "executing query")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (s *TokenStore) Create(ctx context.Context, userID, appID ulid.ULID, scopes []string, expires time.Time) (database.Token, error) {
 | 
			
		||||
func (s *TokenStore) Create(ctx context.Context, userID, appID ulid.ULID, scopes database.TokenScopes, expires time.Time) (database.Token, error) {
 | 
			
		||||
	q := sqlf.Sprintf(`INSERT INTO tokens
 | 
			
		||||
	(id, user_id, app_id, scopes, expires)
 | 
			
		||||
	values (%s, %s, %s, %v, %v)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue