You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
523 B
JavaScript
24 lines
523 B
JavaScript
export class Auth {
|
|
constructor({
|
|
baseUrl,
|
|
remoteBaseUrl,
|
|
giteaAppBaseUrl,
|
|
giteaClientId,
|
|
giteaClientSecret
|
|
}) {
|
|
this.baseUrl = baseUrl
|
|
this.remoteBaseUrl = remoteBaseUrl
|
|
this.giteaAppBaseUrl = giteaAppBaseUrl
|
|
this.giteaClientId = giteaClientId
|
|
this.giteaClientSecret = giteaClientSecret
|
|
}
|
|
|
|
async redirect(event) {
|
|
const url = new URL(
|
|
this.remoteBaseUrl + '/'
|
|
)
|
|
event.respondWith(new Response(
|
|
'extract query and redirect', {status: 200}
|
|
))
|
|
}
|
|
} |