This commit is contained in:
@@ -12,17 +12,16 @@ using System.Text;
|
||||
|
||||
namespace Auth.Controllers {
|
||||
[ApiController]
|
||||
[Route("api/v1/mauth/")]
|
||||
[Route("api/auth/")]
|
||||
public class MAuthController : MistoxControllerBase {
|
||||
|
||||
public MAuthController(DatabaseService db) : base(db) { }
|
||||
|
||||
// Sends the public key to clients so they can verify sessions.
|
||||
// Sends the public key to clients so they can verify sessions. - Verified working
|
||||
[HttpGet("publickey")]
|
||||
public IActionResult PublicKey() {
|
||||
try {
|
||||
RSA rsa = AuthJWT.RsaPublicKey.Rsa;
|
||||
rsa.ImportParameters(AuthJWT.RsaPublicKey.Parameters);
|
||||
byte[] publicKey = rsa.ExportSubjectPublicKeyInfo();
|
||||
string base64 = Convert.ToBase64String(publicKey);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
Reference in New Issue
Block a user